Date: Friday, August 21, 2020 @ 16:34:51
  Author: shibumi
Revision: 686297

update to terraform 0.13.0

not yet building, due to errors with tests

Added:
  terraform/trunk/25555.patch
Modified:
  terraform/trunk/PKGBUILD
Deleted:
  terraform/trunk/test-backport.patch

---------------------+
 25555.patch         |   42 ++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD            |   15 +++++++--------
 test-backport.patch |   32 --------------------------------
 3 files changed, 49 insertions(+), 40 deletions(-)

Added: 25555.patch
===================================================================
--- 25555.patch                         (rev 0)
+++ 25555.patch 2020-08-21 16:34:51 UTC (rev 686297)
@@ -0,0 +1,42 @@
+From ec032370f2459544a0b5e2b995699dab29e580ef Mon Sep 17 00:00:00 2001
+From: Kevin Burke <[email protected]>
+Date: Sun, 12 Jul 2020 14:35:27 -0700
+Subject: [PATCH] helper/schema: ensure test works with Go 1.15 error messages
+
+I verified that the code itself does not have similar assertions about
+the error message that would break if a different string was returned
+for the error message.
+
+Fixes #25553.
+---
+ helper/schema/provider_test.go | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/helper/schema/provider_test.go b/helper/schema/provider_test.go
+index 01ee82a1f4d..13809b35bbf 100644
+--- a/helper/schema/provider_test.go
++++ b/helper/schema/provider_test.go
+@@ -3,7 +3,7 @@ package schema
+ import (
+       "fmt"
+       "reflect"
+-      "strings"
++      "regexp"
+       "testing"
+       "time"
+ 
+@@ -341,9 +341,11 @@ func TestProviderDiff_timeoutInvalidValue(t *testing.T) {
+       if err == nil {
+               t.Fatal("Expected provider.Diff to fail with invalid timeout 
value")
+       }
+-      expectedErrMsg := "time: invalid duration invalid"
+-      if !strings.Contains(err.Error(), expectedErrMsg) {
+-              t.Fatalf("Unexpected error message: %q\nExpected message to 
contain %q",
++      // Go 1.15 added quotes around the invalid duration value. You can 
remove
++      // the regex once Go 1.14 and below are no longer supported.
++      expectedErrMsg := regexp.MustCompile(`time: invalid duration 
"?invalid"?`)
++      if !expectedErrMsg.MatchString(err.Error()) {
++              t.Fatalf("Unexpected error message: %q\nExpected message to 
match rx %q",
+                       err.Error(),
+                       expectedErrMsg)
+       }

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-08-21 16:26:43 UTC (rev 686296)
+++ PKGBUILD    2020-08-21 16:34:51 UTC (rev 686297)
@@ -2,7 +2,7 @@
 # Maintainer: Christian Rebischke <[email protected]>
 
 pkgname=terraform
-pkgver=0.12.29
+pkgver=0.13.0
 pkgrel=1
 pkgdesc="HashiCorp tool for building and updating infrastructure as code 
idempotently"
 url="https://www.terraform.io/";
@@ -9,17 +9,16 @@
 arch=("x86_64")
 license=("MPL")
 makedepends=("go")
-source=(
-       
"$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/terraform/archive/v$pkgver.tar.gz";
-       "test-backport.patch"
-)
-sha512sums=('f1c05af299025b350f6748f832eb046156f97668f235281e446d9a2c400b7361c51e8195d8825a54558554cfbf907e562fb75ac27e296468c950e12f212979b5'
-            
'5c7468f47c19867598bafe07322d1c5a7314286eabab6012aa70a55967967467e620f5a56aeecadf6ebd13021f2c01a4e54c70c41ee09dfd702a082507b3ae47')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/terraform/archive/v$pkgver.tar.gz";
+       "25555.patch")
+sha512sums=('9f789b89466b74128ad75dd6b34c1ccf0f7d2b233ea6a6866a09014dd8c7023c1e5c156bcc9e0834c8fdf06e62694d81d4585fee4829c6fd95129c6cd8645798'
+            
'bb88abb0b57d2a1f779df2036fe529cb17c95fbfc8831a79fdb7a97a7790d3e7247998c2757d7dd7c6193dd48bc99893363363dcf2b26f6d1ecc6f4cb2568c2a')
 changelog="CHANGELOG.md"
 
 prepare() {
        cd "$pkgname-$pkgver"
-       patch -Np1 < "${srcdir}/test-backport.patch"
+       #  helper/schema: ensure test works with Go 1.15 error messages
+       patch -np1 < "${srcdir}/25555.patch"
 }
 
 build() {

Deleted: test-backport.patch
===================================================================
--- test-backport.patch 2020-08-21 16:26:43 UTC (rev 686296)
+++ test-backport.patch 2020-08-21 16:34:51 UTC (rev 686297)
@@ -1,32 +0,0 @@
-From e73ec9437e62f1f75369c847642a52066cfa43da Mon Sep 17 00:00:00 2001
-From: Morten Linderud <[email protected]>
-Date: Mon, 23 Mar 2020 21:30:36 +0100
-Subject: [PATCH] Test patch backport
-
-Signed-off-by: Morten Linderud <[email protected]>
----
- internal/getproviders/registry_source_test.go | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/internal/getproviders/registry_source_test.go 
b/internal/getproviders/registry_source_test.go
-index 0d5efab4880..3d0583b1aa7 100644
---- a/internal/getproviders/registry_source_test.go
-+++ b/internal/getproviders/registry_source_test.go
-@@ -52,7 +52,7 @@ func TestSourceAvailableVersions(t *testing.T) {
-               {
-                       "fails.example.com/foo/bar",
-                       nil,
--                      `could not query provider registry for 
fails.example.com/foo/bar: Get ` + baseURL + 
`/fails-immediately/foo/bar/versions: EOF`,
-+                      `could not query provider registry for 
fails.example.com/foo/bar: Get "` + baseURL + 
`/fails-immediately/foo/bar/versions": EOF`,
-               },
-       }
- 
-@@ -151,7 +151,7 @@ func TestSourcePackageMeta(t *testing.T) {
-                       "1.2.0",
-                       "linux", "amd64",
-                       PackageMeta{},
--                      `could not query provider registry for 
fails.example.com/awesomesauce/happycloud: Get 
http://placeholder-origin/fails-immediately/awesomesauce/happycloud/1.2.0/download/linux/amd64:
 EOF`,
-+                      `could not query provider registry for 
fails.example.com/awesomesauce/happycloud: Get 
"http://placeholder-origin/fails-immediately/awesomesauce/happycloud/1.2.0/download/linux/amd64":
 EOF`,
-               },
-       }
- 

Reply via email to