Skip to content

Commit 35f7991

Browse files
authored
Merge pull request #963 from threefoldtech/development_mnemonics_rename_split_tests
rename mnemonics to mnemonic
2 parents 1990228 + a9f36d0 commit 35f7991

7 files changed

Lines changed: 35 additions & 35 deletions

File tree

.github/workflows/terratest.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ jobs:
5252
mv terraform-provider-grid ~/.terraform.d/plugins/threefoldtechdev.com/providers/grid/0.2/linux_amd64/
5353
- name: Test virtual machines
5454
env:
55-
MNEMONICS: ${{ secrets.MNEMONICS }}
55+
MNEMONIC: ${{ secrets.MNEMONICS }}
5656
NETWORK: ${{ matrix.network }}
5757
working-directory: integrationtests
5858
run: go test -v ./... --tags=integration -run TestVM
5959

6060
- name: Test kubernetes
6161
env:
62-
MNEMONICS: ${{ secrets.MNEMONICS }}
62+
MNEMONIC: ${{ secrets.MNEMONICS }}
6363
NETWORK: ${{ matrix.network }}
6464
working-directory: integrationtests
6565
run: |
@@ -68,70 +68,70 @@ jobs:
6868
6969
- name: Test Gateways
7070
env:
71-
MNEMONICS: ${{ secrets.MNEMONICS }}
71+
MNEMONIC: ${{ secrets.MNEMONICS }}
7272
NETWORK: ${{ matrix.network }}
7373
working-directory: integrationtests
7474
run: go test -v ./... --tags=integration -run TestGatewayDeployments
7575

7676
- name: Test private gateways
7777
env:
78-
MNEMONICS: ${{ secrets.MNEMONICS }}
78+
MNEMONIC: ${{ secrets.MNEMONICS }}
7979
NETWORK: ${{ matrix.network }}
8080
working-directory: integrationtests
8181
run: go test -v ./... --tags=integration -run TestGatewayPrivate
8282

8383
- name: Test wireguard
8484
env:
85-
MNEMONICS: ${{ secrets.MNEMONICS }}
85+
MNEMONIC: ${{ secrets.MNEMONICS }}
8686
NETWORK: ${{ matrix.network }}
8787
working-directory: integrationtests
8888
run: go test -v ./... --tags=integration -run TestWireguard
8989

9090
- name: Test ZDBs
9191
env:
92-
MNEMONICS: ${{ secrets.MNEMONICS }}
92+
MNEMONIC: ${{ secrets.MNEMONICS }}
9393
NETWORK: ${{ matrix.network }}
9494
working-directory: integrationtests
9595
run: go test -v ./... --tags=integration -run TestZdbs
9696

9797
- name: Test QSFS
9898
env:
99-
MNEMONICS: ${{ secrets.MNEMONICS }}
99+
MNEMONIC: ${{ secrets.MNEMONICS }}
100100
NETWORK: ${{ matrix.network }}
101101
working-directory: integrationtests
102102
run: go test -v ./... --tags=integration -run TestQSFS
103103

104104
- name: Test peertube
105105
env:
106-
MNEMONICS: ${{ secrets.MNEMONICS }}
106+
MNEMONIC: ${{ secrets.MNEMONICS }}
107107
NETWORK: ${{ matrix.network }}
108108
working-directory: integrationtests
109109
run: go test -v ./... --tags=integration -run TestPeertube
110110

111111
- name: Test presearch
112112
env:
113-
MNEMONICS: ${{ secrets.MNEMONICS }}
113+
MNEMONIC: ${{ secrets.MNEMONICS }}
114114
NETWORK: ${{ matrix.network }}
115115
working-directory: integrationtests
116116
run: go test -v ./... --tags=integration -run TestPresearch
117117

118118
- name: Test taiga
119119
env:
120-
MNEMONICS: ${{ secrets.MNEMONICS }}
120+
MNEMONIC: ${{ secrets.MNEMONICS }}
121121
NETWORK: ${{ matrix.network }}
122122
working-directory: integrationtests
123123
run: go test -v ./... --tags=integration -run TestTaiga
124124

125125
- name: Test mattermost
126126
env:
127-
MNEMONICS: ${{ secrets.MNEMONICS }}
127+
MNEMONIC: ${{ secrets.MNEMONICS }}
128128
NETWORK: ${{ matrix.network }}
129129
working-directory: integrationtests
130130
run: go test -v ./... --tags=integration -run TestMattermost
131131

132132
- name: Test nomad
133133
env:
134-
MNEMONICS: ${{ secrets.MNEMONICS }}
134+
MNEMONIC: ${{ secrets.MNEMONICS }}
135135
NETWORK: ${{ matrix.network }}
136136
working-directory: integrationtests
137137
run: go test -v ./... --tags=integration -run TestNomad

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ make docs
4949

5050
```bash
5151
cd examples/resources/singlenode
52-
export MNEMONICS="mnemonics words"
52+
export MNEMONIC="mnemonic words"
5353
export NETWORK="network" # dev, qa, test, main
5454
terraform init && terraform apply # creates resources defined in main.tf
5555
terraform destroy # destroy the created resource
@@ -67,7 +67,7 @@ make
6767
## Run tests
6868

6969
```bash
70-
export MNEMONICS="mnemonics words"
70+
export MNEMONIC="mnemonic words"
7171
export NETWORK="network" # dev, qa, test, main
7272
```
7373

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ description: |-
1818
### Optional
1919

2020
- `key_type` (String) key type registered on substrate (ed25519 or sr25519)
21-
- `mnemonics` (String, Sensitive)
21+
- `mnemonic` (String, Sensitive)
2222
- `network` (String) grid network, one of: dev test qa main
2323
- `relay_url` (String) rmb proxy url, example: wss://relay.dev.grid.tf
2424
- `rmb_timeout` (Number) timeout duration in seconds for rmb calls

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ require (
1515
github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.11
1616
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.15.11
1717
github.com/threefoldtech/zos v0.5.6-0.20240611092312-66184cdeb953
18-
golang.org/x/crypto v0.25.0
19-
golang.org/x/sync v0.7.0
18+
golang.org/x/crypto v0.26.0
19+
golang.org/x/sync v0.8.0
2020
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20210803171230-4253848d036c
2121
)
2222

@@ -139,8 +139,8 @@ require (
139139
golang.org/x/mod v0.17.0 // indirect
140140
golang.org/x/net v0.25.0 // indirect
141141
golang.org/x/oauth2 v0.17.0 // indirect
142-
golang.org/x/sys v0.22.0 // indirect
143-
golang.org/x/text v0.16.0 // indirect
142+
golang.org/x/sys v0.23.0 // indirect
143+
golang.org/x/text v0.17.0 // indirect
144144
golang.org/x/time v0.5.0 // indirect
145145
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
146146
gonum.org/v1/gonum v0.15.0 // indirect

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,8 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP
755755
golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
756756
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
757757
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
758-
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
759-
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
758+
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
759+
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
760760
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
761761
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
762762
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -897,8 +897,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
897897
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
898898
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
899899
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
900-
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
901-
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
900+
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
901+
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
902902
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
903903
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
904904
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -987,15 +987,15 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
987987
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
988988
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
989989
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
990-
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
991-
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
990+
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
991+
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
992992
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
993993
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
994994
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
995995
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
996996
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
997-
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
998-
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
997+
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
998+
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
999999
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
10001000
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
10011001
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1007,8 +1007,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
10071007
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
10081008
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
10091009
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
1010-
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
1011-
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
1010+
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
1011+
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
10121012
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
10131013
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
10141014
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

integrationtests/remoterun.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ import (
1818
)
1919

2020
func setup() (deployer.TFPluginClient, error) {
21-
mnemonics := os.Getenv("MNEMONICS")
21+
mnemonic := os.Getenv("MNEMONIC")
2222

2323
network := os.Getenv("NETWORK")
2424
if network == "" {
2525
network = "dev"
2626
}
2727

28-
return deployer.NewTFPluginClient(mnemonics, deployer.WithNetwork(network), deployer.WithLogs())
28+
return deployer.NewTFPluginClient(mnemonic, deployer.WithNetwork(network), deployer.WithLogs())
2929
}
3030

3131
// RemoteRun used for running cmd remotely using ssh

internal/provider/provider.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ func New(version string, st state.Getter) (func() *schema.Provider, subi.Substra
2626
return func() *schema.Provider {
2727
p := &schema.Provider{
2828
Schema: map[string]*schema.Schema{
29-
"mnemonics": {
29+
"mnemonic": {
3030
Type: schema.TypeString,
3131
Required: true,
3232
Sensitive: true,
33-
DefaultFunc: schema.EnvDefaultFunc("MNEMONICS", nil),
33+
DefaultFunc: schema.EnvDefaultFunc("MNEMONIC", nil),
3434
},
3535
"key_type": {
3636
Type: schema.TypeString,
@@ -103,7 +103,7 @@ func New(version string, st state.Getter) (func() *schema.Provider, subi.Substra
103103
func providerConfigure(st state.Getter) (func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics), subi.SubstrateExt) {
104104
var substrateConn subi.SubstrateExt
105105
return func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) {
106-
mnemonics := d.Get("mnemonics").(string)
106+
mnemonic := d.Get("mnemonic").(string)
107107
keyType := d.Get("key_type").(string)
108108
network := d.Get("network").(string)
109109
substrateURL := d.Get("substrate_url").(string)
@@ -141,7 +141,7 @@ func providerConfigure(st state.Getter) (func(ctx context.Context, d *schema.Res
141141
opts = append(opts, deployer.WithLogs())
142142
}
143143

144-
tfPluginClient, err := deployer.NewTFPluginClient(mnemonics, opts...)
144+
tfPluginClient, err := deployer.NewTFPluginClient(mnemonic, opts...)
145145
if err != nil {
146146
return nil, diag.FromErr(errors.Wrap(err, "error creating threefold plugin client"))
147147
}

0 commit comments

Comments
 (0)