@@ -53,7 +53,6 @@ import (
53
53
const targetNamespace = "importer-namespace"
54
54
const credSuffixTest = "-credentials"
55
55
const activeStatus = "ACTIVE"
56
- const sampleStreamName = "sample_stream_solar"
57
56
58
57
var federationSettingsID string
59
58
var identityProviderStatus string
@@ -1040,14 +1039,6 @@ func TestProjectWithStreamsProcessing(t *testing.T) {
1040
1039
),
1041
1040
Namespace : targetNamespace ,
1042
1041
},
1043
- // sample_stream_solar is a sample connection which is added by default to new stream instances
1044
- {
1045
- Name : resources .NormalizeAtlasName (
1046
- fmt .Sprintf ("%s-%s-%s" , generator .projectName , generator .streamInstanceName , sampleStreamName ),
1047
- resources .AtlasNameToKubernetesName (),
1048
- ),
1049
- Namespace : targetNamespace ,
1050
- },
1051
1042
},
1052
1043
},
1053
1044
Status : akov2status.AtlasStreamInstanceStatus {
@@ -1061,84 +1052,52 @@ func TestProjectWithStreamsProcessing(t *testing.T) {
1061
1052
}
1062
1053
1063
1054
if connection , ok := object .(* akov2.AtlasStreamConnection ); ok {
1064
- if connection .Spec .Name == sampleStreamName {
1065
- assert .Equal (
1066
- t ,
1067
- & akov2.AtlasStreamConnection {
1068
- TypeMeta : metav1.TypeMeta {
1069
- Kind : "AtlasStreamConnection" ,
1070
- APIVersion : "atlas.mongodb.com/v1" ,
1071
- },
1072
- ObjectMeta : metav1.ObjectMeta {
1073
- Name : resources .NormalizeAtlasName (
1074
- fmt .Sprintf ("%s-%s-%s" , generator .projectName , generator .streamInstanceName , sampleStreamName ),
1075
- resources .AtlasNameToKubernetesName (),
1076
- ),
1077
- Namespace : targetNamespace ,
1078
- Labels : map [string ]string {
1079
- "mongodb.com/atlas-resource-version" : "2.4.0" ,
1080
- },
1081
- },
1082
- Spec : akov2.AtlasStreamConnectionSpec {
1083
- Name : sampleStreamName ,
1084
- ConnectionType : "Sample" ,
1085
- },
1086
- Status : akov2status.AtlasStreamConnectionStatus {
1087
- Common : akoapi.Common {
1088
- Conditions : []akoapi.Condition {},
1089
- },
1090
- },
1055
+ assert .Equal (
1056
+ t ,
1057
+ & akov2.AtlasStreamConnection {
1058
+ TypeMeta : metav1.TypeMeta {
1059
+ Kind : "AtlasStreamConnection" ,
1060
+ APIVersion : "atlas.mongodb.com/v1" ,
1091
1061
},
1092
- connection ,
1093
- )
1094
- } else {
1095
- assert .Equal (
1096
- t ,
1097
- & akov2.AtlasStreamConnection {
1098
- TypeMeta : metav1.TypeMeta {
1099
- Kind : "AtlasStreamConnection" ,
1100
- APIVersion : "atlas.mongodb.com/v1" ,
1101
- },
1102
- ObjectMeta : metav1.ObjectMeta {
1103
- Name : resources .NormalizeAtlasName (
1104
- fmt .Sprintf ("%s-%s-%s" , generator .projectName , generator .streamInstanceName , generator .streamConnectionName ),
1105
- resources .AtlasNameToKubernetesName (),
1106
- ),
1107
- Namespace : targetNamespace ,
1108
- Labels : map [string ]string {
1109
- "mongodb.com/atlas-resource-version" : "2.4.0" ,
1110
- },
1062
+ ObjectMeta : metav1.ObjectMeta {
1063
+ Name : resources .NormalizeAtlasName (
1064
+ fmt .Sprintf ("%s-%s-%s" , generator .projectName , generator .streamInstanceName , generator .streamConnectionName ),
1065
+ resources .AtlasNameToKubernetesName (),
1066
+ ),
1067
+ Namespace : targetNamespace ,
1068
+ Labels : map [string ]string {
1069
+ "mongodb.com/atlas-resource-version" : "2.4.0" ,
1111
1070
},
1112
- Spec : akov2.AtlasStreamConnectionSpec {
1113
- Name : generator .streamConnectionName ,
1114
- ConnectionType : "Kafka" ,
1115
- KafkaConfig : & akov2.StreamsKafkaConnection {
1116
- Authentication : akov2.StreamsKafkaAuthentication {
1117
- Mechanism : "SCRAM-256" ,
1118
- Credentials : akov2common.ResourceRefNamespaced {
1119
- Name : resources .NormalizeAtlasName (
1120
- fmt .Sprintf ("%s-%s-%s-userpass" , generator .projectName , generator .streamInstanceName , generator .streamConnectionName ),
1121
- resources .AtlasNameToKubernetesName (),
1122
- ),
1123
- Namespace : targetNamespace ,
1124
- },
1125
- },
1126
- BootstrapServers : "example.com:8080,fraud.example.com:8000" ,
1127
- Security : akov2.StreamsKafkaSecurity {
1128
- Protocol : "PLAINTEXT" ,
1071
+ },
1072
+ Spec : akov2.AtlasStreamConnectionSpec {
1073
+ Name : generator .streamConnectionName ,
1074
+ ConnectionType : "Kafka" ,
1075
+ KafkaConfig : & akov2.StreamsKafkaConnection {
1076
+ Authentication : akov2.StreamsKafkaAuthentication {
1077
+ Mechanism : "SCRAM-256" ,
1078
+ Credentials : akov2common.ResourceRefNamespaced {
1079
+ Name : resources .NormalizeAtlasName (
1080
+ fmt .Sprintf ("%s-%s-%s-userpass" , generator .projectName , generator .streamInstanceName , generator .streamConnectionName ),
1081
+ resources .AtlasNameToKubernetesName (),
1082
+ ),
1083
+ Namespace : targetNamespace ,
1129
1084
},
1130
- Config : map [string ]string {"auto.offset.reset" : "earliest" },
1131
1085
},
1132
- },
1133
- Status : akov2status.AtlasStreamConnectionStatus {
1134
- Common : akoapi.Common {
1135
- Conditions : []akoapi.Condition {},
1086
+ BootstrapServers : "example.com:8080,fraud.example.com:8000" ,
1087
+ Security : akov2.StreamsKafkaSecurity {
1088
+ Protocol : "PLAINTEXT" ,
1136
1089
},
1090
+ Config : map [string ]string {"auto.offset.reset" : "earliest" },
1137
1091
},
1138
1092
},
1139
- connection ,
1140
- )
1141
- }
1093
+ Status : akov2status.AtlasStreamConnectionStatus {
1094
+ Common : akoapi.Common {
1095
+ Conditions : []akoapi.Condition {},
1096
+ },
1097
+ },
1098
+ },
1099
+ connection ,
1100
+ )
1142
1101
}
1143
1102
1144
1103
if secret , ok := object .(* corev1.Secret ); ok && strings .Contains (secret .Name , "userpass" ) {
0 commit comments