On Thu, Dec 08, 2022 at 09:17:53PM +0200, Adrian Bunk wrote: > Package: release.debian.org > Severity: normal > Tags: bullseye > User: release.debian....@packages.debian.org > Usertags: pu > X-Debbugs-Cc: Debian Go Packaging Team > <pkg-go-maintain...@lists.alioth.debian.org> > > * Add upstream fix for intermittent test failures. (Closes: #848055) > > Test-only change to fix flaky build: > https://tests.reproducible-builds.org/debian/history/golang-github-go-chef-chef.html
The missing debdiff is now attached. cu Adrian
diff -Nru golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/changelog golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/changelog --- golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/changelog 2021-01-09 17:26:27.000000000 +0200 +++ golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/changelog 2022-12-08 20:41:54.000000000 +0200 @@ -1,3 +1,17 @@ +golang-github-go-chef-chef (0.0.1+git20161023.60.deb8c38-1.2~deb11u1) bullseye; urgency=medium + + * Non-maintainer upload. + * Rebuild for bullseye. + + -- Adrian Bunk <b...@debian.org> Thu, 08 Dec 2022 20:41:54 +0200 + +golang-github-go-chef-chef (0.0.1+git20161023.60.deb8c38-1.2) unstable; urgency=medium + + * Non-maintainer upload. + * Add upstream fix for intermittent test failures. (Closes: #848055) + + -- Adrian Bunk <b...@debian.org> Sun, 04 Dec 2022 19:02:27 +0200 + golang-github-go-chef-chef (0.0.1+git20161023.60.deb8c38-1.1) unstable; urgency=medium * Non maintainer upload by the Reproducible Builds team. diff -Nru golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/0001-Fix-the-intermittent-failures-in-the-String-tests.patch golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/0001-Fix-the-intermittent-failures-in-the-String-tests.patch --- golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/0001-Fix-the-intermittent-failures-in-the-String-tests.patch 1970-01-01 02:00:00.000000000 +0200 +++ golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/0001-Fix-the-intermittent-failures-in-the-String-tests.patch 2022-12-04 19:02:27.000000000 +0200 @@ -0,0 +1,107 @@ +From b8a5b9cbb7b472eba5c1e2759aa6c288b8251de1 Mon Sep 17 00:00:00 2001 +From: markgibbons <mark.gibb...@nordstrom.com> +Date: Sat, 7 Dec 2019 07:10:13 -0800 +Subject: Fix the intermittent failures in the String tests + +diff --git a/client_test.go b/client_test.go +index ad7aff7..7daeeaf 100644 +--- a/client_test.go ++++ b/client_test.go +@@ -40,15 +40,17 @@ func TestClientsService_List(t *testing.T) { + mux.HandleFunc("/clients", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, `{"client1": "http://localhost/clients/client1", "client2": "http://localhost/clients/client2"}`) + }) +- + response, err := client.Clients.List() + if err != nil { + t.Errorf("Clients.List returned error: %v", err) + } + ++ // The order printed by the String function is not defined + want := "client1 => http://localhost/clients/client1\nclient2 => http://localhost/clients/client2\n" +- if response.String() != want { +- t.Errorf("Clients.List returned:\n%+v\nwant:\n%+v\n", response.String(), want) ++ want2 := "client2 => http://localhost/clients/client2\nclient1 => http://localhost/clients/client1\n" ++ rstr := response.String() ++ if rstr != want && rstr != want2 { ++ t.Errorf("Clients.List returned:\n%+v\nwant:\n%+v\n", rstr, want) + } + } + +diff --git a/databag_test.go b/databag_test.go +index 5ea7514..071fc4b 100644 +--- a/databag_test.go ++++ b/databag_test.go +@@ -157,8 +157,11 @@ func TestDataBagsService_UpdateItem(t *testing.T) { + + func TestDataBagsService_DataBagListResultString(t *testing.T) { + e := &DataBagListResult{"bag1": "http://localhost/data/bag1", "bag2": "http://localhost/data/bag2"} ++ // The output order is not guarenteed by the String function, check for either order + want := "bag1 => http://localhost/data/bag1\nbag2 => http://localhost/data/bag2\n" +- if e.String() != want { +- t.Errorf("DataBagListResult.String returned:\n%+v\nwant:\n%+v\n", e.String(), want) ++ want2 := "bag2 => http://localhost/data/bag2\nbag1 => http://localhost/data/bag1\n" ++ ebag := e.String() ++ if ebag != want && ebag != want2 { ++ t.Errorf("DataBagListResult.String returned:\n%+v\nwant:\n%+v\n", ebag, want) + } + } +diff --git a/environment_test.go b/environment_test.go +index 1bb7470..ff1b37a 100644 +--- a/environment_test.go ++++ b/environment_test.go +@@ -143,16 +143,19 @@ func TestEnvironmentsService_Put(t *testing.T) { + + func TestEnvironmentsService_EnvironmentListResultString(t *testing.T) { + e := &EnvironmentResult{"_default": "https://api.opscode.com/organizations/org_name/environments/_default", "webserver": "https://api.opscode.com/organizations/org_name/environments/webserver"} ++ estr := e.String() + want := "_default => https://api.opscode.com/organizations/org_name/environments/_default\nwebserver => https://api.opscode.com/organizations/org_name/environments/webserver\n" +- if e.String() != want { +- t.Errorf("EnvironmentResult.String returned:\n%+v\nwant:\n%+v\n", e.String(), want) ++ want2 := "webserver => https://api.opscode.com/organizations/org_name/environments/webserver\n_default => https://api.opscode.com/organizations/org_name/environments/_default\n" ++ if estr != want && estr != want2 { ++ t.Errorf("EnvironmentResult.String returned:\n%+v\nwant:\n%+v\n", estr, want) + } + } + + func TestEnvironmentsService_EnvironmentCreateResultString(t *testing.T) { + e := &EnvironmentResult{"uri": "http://localhost:4000/environments/dev"} ++ estr := e.String() + want := "uri => http://localhost:4000/environments/dev\n" +- if e.String() != want { +- t.Errorf("EnvironmentResult.String returned %+v, want %+v", e.String(), want) ++ if estr != want { ++ t.Errorf("EnvironmentResult.String returned %+v, want %+v", estr, want) + } + } +diff --git a/role_test.go b/role_test.go +index 6ce09af..cfc9e66 100644 +--- a/role_test.go ++++ b/role_test.go +@@ -178,17 +178,19 @@ func TestRolesService_Put(t *testing.T) { + + func TestRolesService_RoleListResultString(t *testing.T) { + r := &RoleListResult{"foo": "http://localhost:4000/roles/foo"} ++ rstr := r.String() + want := "foo => http://localhost:4000/roles/foo\n" +- if r.String() != want { +- t.Errorf("RoleListResult.String returned %+v, want %+v", r.String(), want) ++ if rstr != want { ++ t.Errorf("RoleListResult.String returned %+v, want %+v", rstr, want) + } + } + + func TestRolesService_RoleCreateResultString(t *testing.T) { + r := &RoleCreateResult{"uri": "http://localhost:4000/roles/webserver"} ++ rstr := r.String() + want := "uri => http://localhost:4000/roles/webserver\n" +- if r.String() != want { +- t.Errorf("RoleCreateResult.String returned %+v, want %+v", r.String(), want) ++ if rstr != want { ++ t.Errorf("RoleCreateResult.String returned %+v, want %+v", rstr, want) + } + } + +-- +2.30.2 + diff -Nru golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/series golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/series --- golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/series 2016-11-22 20:02:28.000000000 +0200 +++ golang-github-go-chef-chef-0.0.1+git20161023.60.deb8c38/debian/patches/series 2022-12-04 19:02:17.000000000 +0200 @@ -1 +1,2 @@ standalone_ctdk_libs.patch +0001-Fix-the-intermittent-failures-in-the-String-tests.patch