Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: prevent declarative-rules test churn when new versions are added #102127

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkg/cli/declarative_print_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ func TestDeclarativeRules(t *testing.T) {
defer c.Cleanup()

t.Run("declarative corpus validation standalone command", func(t *testing.T) {
version := clusterversion.TestingBinaryVersion
invalidOut, err := c.RunWithCapture(fmt.Sprintf("debug declarative-print-rules %s op", "1.1"))
if err != nil {
t.Fatal(err)
}
opOut, err := c.RunWithCapture(fmt.Sprintf("debug declarative-print-rules %s op", version.String()))
version := clusterversion.TestingBinaryVersion
versionString := strings.Split(version.String(), "-")[0]
opOut, err := c.RunWithCapture(fmt.Sprintf("debug declarative-print-rules %s op", versionString))
if err != nil {
t.Fatal(err)
}
depOut, err := c.RunWithCapture(fmt.Sprintf("debug declarative-print-rules %s dep", version.String()))
depOut, err := c.RunWithCapture(fmt.Sprintf("debug declarative-print-rules %s dep", versionString))
if err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/declarative-rules/deprules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dep
----
debug declarative-print-rules 1000023.1-2 dep
debug declarative-print-rules 1000023.1 dep
deprules
----
- name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED'
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/declarative-rules/oprules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
op
----
debug declarative-print-rules 1000023.1-2 op
debug declarative-print-rules 1000023.1 op
rules
----
[]