1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

lint gha job

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-08-21 15:33:48 +02:00
parent 5302241995
commit 9582eb6661
7 changed files with 79 additions and 42 deletions
+6 -7
View File
@@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"strings"
"testing"
@@ -32,7 +31,7 @@ type mockProgram struct {
// Output returns responses from the remote credentials helper.
// It mocks those responses based in the input in the mock.
func (m *mockProgram) Output() ([]byte, error) {
in, err := ioutil.ReadAll(m.input)
in, err := io.ReadAll(m.input)
if err != nil {
return nil, err
}
@@ -108,8 +107,8 @@ func ExampleStore() {
func TestStore(t *testing.T) {
valid := []credentials.Credentials{
{validServerAddress, "foo", "bar"},
{validServerAddress2, "<token>", "abcd1234"},
{ServerURL: validServerAddress, Username: "foo", Secret: "bar"},
{ServerURL: validServerAddress2, Username: "<token>", Secret: "abcd1234"},
}
for _, v := range valid {
@@ -119,7 +118,7 @@ func TestStore(t *testing.T) {
}
invalid := []credentials.Credentials{
{invalidServerAddress, "foo", "bar"},
{ServerURL: invalidServerAddress, Username: "foo", Secret: "bar"},
}
for _, v := range invalid {
@@ -142,8 +141,8 @@ func ExampleGet() {
func TestGet(t *testing.T) {
valid := []credentials.Credentials{
{validServerAddress, "foo", "bar"},
{validServerAddress2, "<token>", "abcd1234"},
{ServerURL: validServerAddress, Username: "foo", Secret: "bar"},
{ServerURL: validServerAddress2, Username: "<token>", Secret: "abcd1234"},
}
for _, v := range valid {