summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-05-15 23:34:15 +0700
committerShulhan <ms@kilabit.info>2023-05-15 23:34:15 +0700
commitbee390efcc5ab2c03738ee36e06a0bac108ad392 (patch)
tree68e7034ef4e627ee65e3e414f7849243d7c4119c
parentbb1160d3f13514bebcb81e89c082198c5278b89e (diff)
downloadgotp-bee390efcc5ab2c03738ee36e06a0bac108ad392.tar.xz
all: group the key for testing into testdata/keys
-rw-r--r--config_test.go6
-rw-r--r--testdata/keys/rsa-openssl.pem (renamed from testdata/rsa)0
-rw-r--r--testdata/keys/rsa-openssl.pem.pub (renamed from testdata/rsa.pub)0
-rw-r--r--testdata/with_private_key.conf (renamed from testdata/rsa.conf)2
4 files changed, 4 insertions, 4 deletions
diff --git a/config_test.go b/config_test.go
index e27172d..b877236 100644
--- a/config_test.go
+++ b/config_test.go
@@ -26,14 +26,14 @@ func TestNewConfig(t *testing.T) {
},
}, {
desc: `With openssh rsa`,
- configFile: `testdata/rsa.conf`,
+ configFile: `testdata/with_private_key.conf`,
expConfig: &config{
- PrivateKey: `testdata/rsa`,
+ PrivateKey: `testdata/keys/rsa-openssl.pem`,
Issuers: map[string]string{
`email-domain`: `XYZ`,
`test`: `ABCD`,
},
- file: `testdata/rsa.conf`,
+ file: `testdata/with_private_key.conf`,
},
}}
diff --git a/testdata/rsa b/testdata/keys/rsa-openssl.pem
index 930e049..930e049 100644
--- a/testdata/rsa
+++ b/testdata/keys/rsa-openssl.pem
diff --git a/testdata/rsa.pub b/testdata/keys/rsa-openssl.pem.pub
index bf1e99d..bf1e99d 100644
--- a/testdata/rsa.pub
+++ b/testdata/keys/rsa-openssl.pem.pub
diff --git a/testdata/rsa.conf b/testdata/with_private_key.conf
index be9d289..51988c3 100644
--- a/testdata/rsa.conf
+++ b/testdata/with_private_key.conf
@@ -1,5 +1,5 @@
[gotp]
-private_key = testdata/rsa
+private_key = testdata/keys/rsa-openssl.pem
[gotp "issuer"]
test = ABCD