Skip to content

Commit

Permalink
e2e through all Stack ConfigMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
katyanna committed Oct 24, 2023
1 parent ad4d09f commit 89dd788
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/e2e/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ func verifyStack(t *testing.T, stacksetName, currentVersion string, stacksetSpec
}

// Verify ConfigMaps
if stacksetSpec.StackTemplate.Spec.ConfigurationResources != nil {
configMap, err := waitForConfigMap(t, stack.Name)
for _, rsc := range stacksetSpec.StackTemplate.Spec.ConfigurationResources {
configMap, err := waitForConfigMap(t, rsc.ConfigMapRef.Name, stack.Name)
require.NoError(t, err)
require.EqualValues(t, stackResourceLabels, configMap.Labels)
require.Contains(t, configMap.Name, stack.Name)
Expand Down
3 changes: 2 additions & 1 deletion cmd/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ func waitForRouteGroup(t *testing.T, name string) (*rgv1.RouteGroup, error) {
return routegroupInterface().Get(context.Background(), name, metav1.GetOptions{})
}

func waitForConfigMap(t *testing.T, name string) (*corev1.ConfigMap, error) {
func waitForConfigMap(t *testing.T, configMapName string, stackName string) (*corev1.ConfigMap, error) {
name := stackName + "-" + configMapName
err := resourceCreated(t, "configmap", name, configMapInterface()).await()
if err != nil {
return nil, err
Expand Down

0 comments on commit 89dd788

Please sign in to comment.