File: token_test.go

package info (click to toggle)
golang-github-scaleway-scaleway-sdk-go 1.0.0~beta32-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,444 kB
  • sloc: sh: 70; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 352 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package auth

import (
	"net/http"
	"testing"

	"github.com/scaleway/scaleway-sdk-go/internal/testhelpers"
)

func TestToken_Headers(t *testing.T) {
	const (
		accessKey = "ACCESS_KEY"
		secretKey = "SECRET_KEY"
	)
	auth := NewToken(accessKey, secretKey)
	testhelpers.Equals(t, http.Header{
		"X-Auth-Token": []string{secretKey},
	}, auth.Headers())
}