-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add creating safes feature in terraform provider (#175)
* feat: add creating safes feature in terraform provider * feat: fix PR comments
- Loading branch information
1 parent
6d63ba2
commit 9b5a870
Showing
6 changed files
with
173 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,14 +83,14 @@ func TestSignAppin(t *testing.T) { | |
testConfig := UserTestConfig{ | ||
name: "TestSignAppin", | ||
server: httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
})), | ||
response: &entities.SignApinResponse{ | ||
UserId: 1, | ||
EmailAddress: "Felipe", | ||
EmailAddress: "[email protected]", | ||
}, | ||
} | ||
|
||
|
@@ -120,14 +120,14 @@ func TestSignAppinWithApiKey(t *testing.T) { | |
testConfig := UserTestConfig{ | ||
name: "TestSignAppinWithApiKey", | ||
server: httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
})), | ||
response: &entities.SignApinResponse{ | ||
UserId: 1, | ||
EmailAddress: "Felipe", | ||
EmailAddress: "[email protected]", | ||
}, | ||
} | ||
|
||
|
@@ -209,7 +209,7 @@ func TestGetPasswordSafeAuthentication(t *testing.T) { | |
} | ||
|
||
case "/Auth/SignAppIn": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
|
||
if err != nil { | ||
t.Error("Test case Failed") | ||
|
@@ -221,7 +221,7 @@ func TestGetPasswordSafeAuthentication(t *testing.T) { | |
})), | ||
response: &entities.SignApinResponse{ | ||
UserId: 1, | ||
EmailAddress: "Felipe", | ||
EmailAddress: "[email protected]", | ||
}, | ||
} | ||
apiUrl, _ := url.Parse(testConfig.server.URL + "/") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,7 +212,7 @@ func TestManageAccountFlow(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -289,7 +289,7 @@ func TestManageAccountFlowNotFound(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -366,7 +366,7 @@ func TestSecretGetSecret(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -441,7 +441,7 @@ func TestSecretGetSecrets(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -517,7 +517,7 @@ func TestManagedAccountFlowTechnicalErrorCreatingRequest(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -592,7 +592,7 @@ func TestManagedAccountFlowBusinesslErrorCreatingRequest(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -667,7 +667,7 @@ func TestManagedAccountFlowTechnicalErrorCredentialByRequestId(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -742,7 +742,7 @@ func TestManagedAccountFlowBusinessErrorCredentialByRequestId(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -817,7 +817,7 @@ func TestManagedAccountFlowBusinessErrorAccountRequestCheckIn(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -892,7 +892,7 @@ func TestManagedAccountFlowTechnicalErrorAccountRequestCheckIn(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -967,7 +967,7 @@ func TestManagedAccountFlowGetAccountTechnicalError(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
@@ -1023,7 +1023,7 @@ func TestManageAccountFlowGetAccountBadResponse(t *testing.T) { | |
switch r.URL.Path { | ||
|
||
case "/Auth/SignAppin": | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"Felipe"}`)) | ||
_, err := w.Write([]byte(`{"UserId":1, "EmailAddress":"[email protected]"}`)) | ||
if err != nil { | ||
t.Error("Test case Failed") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.