github.com/NaverCloudPlatform/ncloud-sdk-go-v2@v1.6.13/ncloud/credentials/credentials_test.go (about)

     1  package credentials
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  )
     7  
     8  func TestIsExpired(t *testing.T) {
     9  	creds := &Credentials{
    10  		value: Value{
    11  			Expiration: time.Now().Add(time.Minute),
    12  		},
    13  	}
    14  	if creds.IsExpired() {
    15  		t.Fatalf("Expected: false, Actual: %v", creds.IsExpired())
    16  	}
    17  }