Skip to content

Commit 4ada105

Browse files
committed
merge in develop
2 parents 2751b16 + 1d37bb4 commit 4ada105

File tree

6 files changed

+48
-25
lines changed

6 files changed

+48
-25
lines changed

.github/kickstart/kickstart.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070
"admin"
7171
]
7272
},
73-
"roles": [
74-
"admin"
75-
],
7673
"skipRegistrationVerification": true,
7774
"user": {
7875
"birthDate": "1981-06-04",

.github/workflows/deploy.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
branches:
77
- main
88
pull_request:
9-
branches:
10-
- main
119
workflow_dispatch:
1210
inputs:
1311
command:
@@ -53,31 +51,31 @@ jobs:
5351
- name: install golang
5452
uses: actions/setup-go@v5
5553
with:
56-
go-version: '1.20'
54+
go-version: oldstable
5755

5856
- name: Compile
59-
if: inputs.command != 'release'
57+
if: success() && inputs.command != 'release'
6058
run: sb compile
6159

6260
- name: Copy our kickstart file over so it gets picked up
63-
if: inputs.command != 'release'
61+
if: success() && inputs.command != 'release'
6462
run: |
6563
mkdir faDockerComposeFilePath
6664
cp -r .github/kickstart faDockerComposeFilePath
6765
cp .github/kickstart/kickstart.json faDockerComposeFilePath/kickstart/k2.json
6866
cp .github/kickstart/kickstart.json .github/kickstart/k2.json
6967
7068
- name: Start FusionAuth
71-
if: inputs.command != 'release'
69+
if: success() && inputs.command != 'release'
7270
uses: fusionauth/fusionauth-github-action@v1
7371
with:
7472
FUSIONAUTH_APP_KICKSTART_FILENAME: k2.json
7573
FUSIONAUTH_APP_KICKSTART_DIRECTORY_PATH: .github/kickstart
7674

7775
- name: Run tests
78-
if: inputs.command != 'release'
76+
if: success() && inputs.command != 'release'
7977
run: sleep 30 && sb test
8078

8179
- name: release to svn
82-
if: inputs.command == 'release'
80+
if: success() && inputs.command == 'release'
8381
run: sb release

build.savant

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2024, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-2025, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* language governing permissions and limitations under the License.
1515
*/
1616

17-
project(group: "io.fusionauth", name: "go-client", version: "1.59.0", licenses: ["ApacheV2_0"]) {
17+
project(group: "io.fusionauth", name: "go-client", version: "1.60.0", licenses: ["ApacheV2_0"]) {
1818
workflow {
1919
fetch {
2020
cache()
@@ -50,7 +50,7 @@ target(name: "format", description: "Formats the source code") {
5050

5151
def process = pb.start()
5252
process.consumeProcessOutput(System.out, System.err)
53-
process.waitFor()
53+
assert process.waitFor() == 0
5454
}
5555

5656
target(name: "compile", description: "Compiles the source code", dependsOn: ["format"]) {
@@ -60,7 +60,7 @@ target(name: "compile", description: "Compiles the source code", dependsOn: ["fo
6060

6161
def process = pb.start()
6262
process.consumeProcessOutput(System.out, System.err)
63-
process.waitFor()
63+
assert process.waitFor() == 0
6464
}
6565

6666
target(name: "test", description: "Runs the project's unit tests", dependsOn: ["compile"]) {
@@ -70,7 +70,7 @@ target(name: "test", description: "Runs the project's unit tests", dependsOn: ["
7070

7171
def process = pb.start()
7272
process.consumeProcessOutput(System.out, System.err)
73-
process.waitFor()
73+
assert process.waitFor() == 0
7474
}
7575

7676
target(name: "int", description: "Releases a local integration build of the project", dependsOn: ["compile"]) {

go.mod

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
module github.com/FusionAuth/go-client
22

3-
go 1.24
3+
go 1.23.0
44

5-
require github.com/stretchr/testify v1.6.1
5+
require github.com/stretchr/testify v1.10.0
6+
7+
require (
8+
github.com/davecgh/go-spew v1.1.1 // indirect
9+
github.com/pmezard/go-difflib v1.0.0 // indirect
10+
gopkg.in/yaml.v3 v3.0.1 // indirect
11+
)

go.sum

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2-
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
44
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
6-
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
7-
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
5+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
6+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
88
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
9-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
10-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
9+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
10+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

pkg/fusionauth/Client_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,28 @@ func TestRetrieveUserSuccess(t *testing.T) {
6060
assert.Equal(t, 200, userResponse.StatusCode)
6161
}
6262

63+
func TestRetrieveUserByLoginIdSuccess(t *testing.T) {
64+
loginIdTypes := []string{"email"}
65+
66+
userResponse, errors, _ := faClient.RetrieveUserByLoginIdWithLoginIdTypes("[email protected]", loginIdTypes)
67+
errJson, _ := json.Marshal(errors)
68+
fmt.Println(string(errJson))
69+
70+
assert.Equal(t, (*Errors)(nil), errors)
71+
assert.Equal(t, 200, userResponse.StatusCode)
72+
}
73+
74+
// TODO: Will pass when issue 1 is released
75+
// func TestRetrieveUserByLoginIdWrongIdentityType(t *testing.T) {
76+
// loginIdTypes := []string{"phoneNumber"}
77+
//
78+
// userResponse, errors, _ := faClient.RetrieveUserByLoginIdWithLoginIdTypes("[email protected]", loginIdTypes)
79+
// errJson, _ := json.Marshal(errors)
80+
// fmt.Println(string(errJson))
81+
//
82+
// assert.Equal(t, 404, userResponse.StatusCode)
83+
// }
84+
6385
func TestMain(m *testing.M) {
6486
os.Exit(m.Run())
6587
}

0 commit comments

Comments
 (0)