You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.Regexp(t, "unable to create NSTemplateTiers: unable to create or update the 'base' NSTemplateTier: unable to create resource of kind: NSTemplateTier, version: v1alpha1: an error", err.Error())
131
-
})
132
-
133
-
t.Run("failed to update nstemplatetiers", func(t*testing.T) {
134
-
// given
135
-
// initialize the client with an existing `advanced` NSTemplatetier
assert.Contains(t, err.Error(), "unable to create NSTemplateTiers: unable to create or update the 'advanced' NSTemplateTier: unable to create resource of kind: NSTemplateTier, version: v1alpha1: unable to update the resource")
126
+
assert.Regexp(t, "unable to create NSTemplateTiers: unable to create or update the 'base' NSTemplateTier: unable to patch 'toolchain.dev.openshift.com/v1alpha1, Kind=NSTemplateTier' called 'base' in namespace '[a-zA-Z0-9-]+': an error", err.Error())
155
127
})
156
128
})
157
129
158
130
t.Run("tiertemplates", func(t*testing.T) {
159
-
160
-
t.Run("failed to create nstemplatetiers", func(t*testing.T) {
131
+
t.Run("failed to create tiertemplate", func(t*testing.T) {
assert.Regexp(t, fmt.Sprintf("unable to create TierTemplates: unable to create the 'base1ns-dev-\\w+-\\w+' TierTemplate in namespace '%s'", namespace), err.Error()) // we can't tell for sure which namespace will fail first, but the error should match the given regex
175
146
})
176
147
})
177
-
178
148
})
179
149
t.Run("failed to load assets", func(t*testing.T) {
assert.Equal(t, "unable to load templates: open /templates/nstemplatetiers/metadata.yaml: file does not exist", err.Error()) // error occurred while creating TierTemplate resources
0 commit comments