summaryrefslogtreecommitdiff
path: root/user/elixir/tests1.patch
blob: 7c74074a9c4c5d08939b346984974bc336672e6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From aaae97992d33ba11374a9140e2ad8aa9aca45e32 Mon Sep 17 00:00:00 2001
From: Jonny Stoten <jonny@jonnystoten.com>
Date: Mon, 13 Jan 2020 08:37:20 +0000
Subject: [PATCH] Don't GPG sign commits or tags in git tests (#9719)

If the machine/user git config is set to sign all commits/tags,
these tests fail.
---
 lib/mix/test/mix/tasks/escript_test.exs |  2 +-
 lib/mix/test/test_helper.exs            | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/mix/test/mix/tasks/escript_test.exs b/lib/mix/test/mix/tasks/escript_test.exs
index 5d9eb8390a..f8f1baaf15 100644
--- a/lib/mix/test/mix/tasks/escript_test.exs
+++ b/lib/mix/test/mix/tasks/escript_test.exs
@@ -351,7 +351,7 @@ defmodule Mix.Tasks.EscriptTest do
       """)
 
       System.cmd("git", ~w[add .])
-      System.cmd("git", ~w[commit -m "ok"])
+      System.cmd("git", ~w[commit --no-gpg-sign -m "ok"])
 
       send(self(), {:mix_shell_input, :yes?, true})
       Mix.Tasks.Escript.Install.run(["git", File.cwd!()])
diff --git a/lib/mix/test/test_helper.exs b/lib/mix/test/test_helper.exs
index b652cd07b2..65e41aa1d1 100644
--- a/lib/mix/test/test_helper.exs
+++ b/lib/mix/test/test_helper.exs
@@ -218,7 +218,7 @@ unless File.dir?(target) do
     System.cmd("git", ~w[config user.email "mix@example.com"])
     System.cmd("git", ~w[config user.name "mix-repo"])
     System.cmd("git", ~w[add .])
-    System.cmd("git", ~w[commit -m "bad"])
+    System.cmd("git", ~w[commit --no-gpg-sign -m "bad"])
   end)
 
   File.write!(Path.join(target, "mix.exs"), """
@@ -237,8 +237,8 @@ unless File.dir?(target) do
 
   File.cd!(target, fn ->
     System.cmd("git", ~w[add .])
-    System.cmd("git", ~w[commit -m "ok"])
-    System.cmd("git", ~w[tag without_module])
+    System.cmd("git", ~w[commit --no-gpg-sign -m "ok"])
+    System.cmd("git", ~w[tag --no-sign without_module])
   end)
 
   File.write!(Path.join(target, "lib/git_repo.ex"), """
@@ -279,8 +279,8 @@ unless File.dir?(target) do
 
   File.cd!(target, fn ->
     System.cmd("git", ~w[add .])
-    System.cmd("git", ~w[commit -m "lib"])
-    System.cmd("git", ~w[tag with_module])
+    System.cmd("git", ~w[commit --no-gpg-sign -m "lib"])
+    System.cmd("git", ~w[tag --no-sign with_module])
   end)
 end
 
@@ -309,7 +309,7 @@ unless File.dir?(target) do
     System.cmd("git", ~w[config user.email "mix@example.com"])
     System.cmd("git", ~w[config user.name "mix-repo"])
     System.cmd("git", ~w[add .])
-    System.cmd("git", ~w[commit -m without-dep])
+    System.cmd("git", ~w[commit --no-gpg-sign -m without-dep])
   end)
 
   File.write!(Path.join(target, "mix.exs"), """
@@ -336,7 +336,7 @@ unless File.dir?(target) do
 
   File.cd!(target, fn ->
     System.cmd("git", ~w[add .])
-    System.cmd("git", ~w[commit -m with-dep])
+    System.cmd("git", ~w[commit --no-gpg-sign -m with-dep])
   end)
 end
 
@@ -364,7 +364,7 @@ unless File.dir?(target) do
     System.cmd("git", ~w[config user.email "mix@example.com"])
     System.cmd("git", ~w[config user.name "mix-repo"])
     System.cmd("git", ~w[add .])
-    System.cmd("git", ~w[commit -m "ok"])
+    System.cmd("git", ~w[commit --no-gpg-sign -m "ok"])
   end)
 end