From c8a9fa4d04383d41885301af3a091d7546bcf693 Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 14 Dec 2023 17:39:32 -0500 Subject: [PATCH] Fix build failures. --- pkg/platform/api/buildplanner/request/createproject.go | 4 ++-- pkg/platform/api/buildplanner/request/mergecommit.go | 4 ++-- pkg/platform/api/buildplanner/request/revertcommit.go | 4 ++-- test/integration/import_int_test.go | 4 ++-- test/integration/publish_int_test.go | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/platform/api/buildplanner/request/createproject.go b/pkg/platform/api/buildplanner/request/createproject.go index 81551b7d8b..221f9f86ff 100644 --- a/pkg/platform/api/buildplanner/request/createproject.go +++ b/pkg/platform/api/buildplanner/request/createproject.go @@ -52,6 +52,6 @@ mutation ($organization: String!, $project: String!, $private: Boolean!, $expr: }` } -func (c *createProject) Vars() map[string]interface{} { - return c.vars +func (c *createProject) Vars() (map[string]interface{}, error) { + return c.vars, nil } diff --git a/pkg/platform/api/buildplanner/request/mergecommit.go b/pkg/platform/api/buildplanner/request/mergecommit.go index d4ce1ace25..413432744e 100644 --- a/pkg/platform/api/buildplanner/request/mergecommit.go +++ b/pkg/platform/api/buildplanner/request/mergecommit.go @@ -71,6 +71,6 @@ mutation ($organization: String!, $project: String!, $targetRef: String!, $other ` } -func (b *mergeCommit) Vars() map[string]interface{} { - return b.vars +func (b *mergeCommit) Vars() (map[string]interface{}, error) { + return b.vars, nil } diff --git a/pkg/platform/api/buildplanner/request/revertcommit.go b/pkg/platform/api/buildplanner/request/revertcommit.go index 70c0829f7a..9cbe101ecc 100644 --- a/pkg/platform/api/buildplanner/request/revertcommit.go +++ b/pkg/platform/api/buildplanner/request/revertcommit.go @@ -74,6 +74,6 @@ mutation ($organization: String!, $project: String!, $commitId: String!, $target }` } -func (r *revertCommit) Vars() map[string]interface{} { - return r.vars +func (r *revertCommit) Vars() (map[string]interface{}, error) { + return r.vars, nil } diff --git a/test/integration/import_int_test.go b/test/integration/import_int_test.go index d94a86eca3..20546ea17f 100644 --- a/test/integration/import_int_test.go +++ b/test/integration/import_int_test.go @@ -81,8 +81,8 @@ func (suite *ImportIntegrationTestSuite) TestImport() { ts := e2e.New(suite.T(), false) defer ts.Close() - username, _ := ts.CreateNewUser() - namespace := fmt.Sprintf("%s/%s", username, "Python3") + user := ts.CreateNewUser() + namespace := fmt.Sprintf("%s/%s", user.Username, "Python3") cp := ts.Spawn("init", "--language", "python", namespace, ts.Dirs.Work) cp.Expect("successfully initialized") diff --git a/test/integration/publish_int_test.go b/test/integration/publish_int_test.go index 4d65f2e3b1..7a517fb443 100644 --- a/test/integration/publish_int_test.go +++ b/test/integration/publish_int_test.go @@ -135,7 +135,7 @@ namespace: org/{{.Username}} version: 2.3.4 description: im-a-description authors: - - name: author-name + - name: author-name email: author-email@domain.tld `), nil, @@ -168,7 +168,7 @@ namespace: org/{{.Username}} version: 2.3.4 description: im-a-description authors: - - name: author-name + - name: author-name email: author-email@domain.tld `), nil, @@ -202,7 +202,7 @@ namespace: org/{{.Username}} version: 2.3.4 description: im-a-description authors: - - name: author-name + - name: author-name email: author-email@domain.tld `), true, @@ -363,7 +363,7 @@ authors: } cp := ts.SpawnWithOpts( - e2e.WithArgs(append([]string{"publish"}, args...)...), + e2e.OptArgs(append([]string{"publish"}, args...)...), ) if inv.expect.immediateOutput != "" { @@ -398,7 +398,7 @@ authors: cp.Expect("Y/n") - snapshot := cp.MatchState().TermState.String() + snapshot := cp.Snapshot() rx := regexp.MustCompile(`(?s)Publish following ingredient\?(.*)\(Y/n`) match := rx.FindSubmatch([]byte(snapshot)) suite.Require().NotNil(match, fmt.Sprintf("Could not match '%s' against: %s", rx.String(), snapshot))