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")
127
+
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
128
})
156
129
})
157
130
158
131
t.Run("tiertemplates", func(t*testing.T) {
159
-
160
-
t.Run("failed to create nstemplatetiers", func(t*testing.T) {
132
+
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
147
})
176
148
})
177
-
178
149
})
179
150
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