Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/auth/cloud-login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Admin
token: ***
certificate: ***
cloudport: 0
cloudauthport: 0
location: ""
type: CA-Signed
25 changes: 25 additions & 0 deletions pkg/auth/niontive_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package auth

import (
"fmt"
"testing"
)

// NIONTIVE - unit test to verify if:
// Cert doesn't need to be renewed and token is expired
// Bubbles up no error for authorizer creation, and we attempt to use an expired token.

func TestNiontive(t *testing.T) {
serverName := "niontive-test-server"

t.Setenv("WSSD_CLIENT_TOKEN", "cloud-login.yaml")

auth, err := NewAuthorizerFromEnvironment(serverName)
if err != nil {
t.Error("Expected no error when creating authorizer, got:", err)
}

rpcCreds := auth.WithRPCAuthorization()

fmt.Println("RPC Credentials:", rpcCreds)
}
Loading