...

Source file src/github.com/aws/smithy-go/transport/http/auth_schemes_test.go

Documentation: github.com/aws/smithy-go/transport/http

     1  package http
     2  
     3  import (
     4  	"testing"
     5  	"github.com/aws/smithy-go/auth"
     6  )
     7  
     8  func TestAnonymousScheme(t *testing.T) {
     9  	expectedID := auth.SchemeIDAnonymous
    10  	scheme := NewAnonymousScheme()
    11  	actualID := scheme.SchemeID()
    12  	if expectedID != actualID {
    13  		t.Errorf("AnonymousScheme constructor is not producing the correct scheme ID")
    14  	}
    15  
    16  	var expectedSigner Signer = &nopSigner{}
    17  	actualSigner := scheme.Signer()
    18  	if expectedSigner != actualSigner {
    19  		t.Errorf("AnonymousScheme constructor is not producing the correct signer")
    20  	}
    21  }
    22  
    23  

View as plain text