<commit_before>//+build !windows

package storage

import (
	"github.com/rancher/agent/model"
	"github.com/rancher/agent/utilities/constants"
	"github.com/rancher/agent/utilities/docker"
	"gopkg.in/check.v1"
	"testing"
)

// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) {
	check.TestingT(t)
}

type ComputeTestSuite struct {
}

var _ = check.Suite(&ComputeTestSuite{})

func (s *ComputeTestSuite) SetUpSuite(c *check.C) {
}

func (s *ComputeTestSuite) TestDoImageActivate(c *check.C) {
	image := model.Image{}
	storagePool := model.StoragePool{}
	imageUUID := "docker:badimage"
	client := docker.GetClient(constants.DefaultVersion)
	err := DoImageActivate(image, storagePool, nil, client, imageUUID)
	c.Check(err, check.NotNil)
}

func (s *ComputeTestSuite) TestPullingPrivateImage(c *check.C) {
	image := model.Image{
		RegistryCredential: model.RegistryCredential{
			PublicValue: "strongmonkey1992",
			SecretValue: "pds123456",
			Data: model.CredentialData{
				Fields: model.CredentialFields{
					ServerAddress: "https://index.docker.io/v1",
					Email:         "<EMAIL>",
				},
			},
		},
	}
	dclient := docker.GetClient(constants.DefaultVersion)
	imageUUID := "strongmonkey1992/docker-whale"
	storagePool := model.StoragePool{}
	err := DoImageActivate(image, storagePool, nil, dclient, imageUUID)
	if err != nil {
		c.Fatal(err)
	}
}
<commit_msg>delete testPrivateImage<commit_after>//+build !windows

package storage

import (
	"github.com/rancher/agent/model"
	"github.com/rancher/agent/utilities/constants"
	"github.com/rancher/agent/utilities/docker"
	"gopkg.in/check.v1"
	"testing"
)

// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) {
	check.TestingT(t)
}

type ComputeTestSuite struct {
}

var _ = check.Suite(&ComputeTestSuite{})

func (s *ComputeTestSuite) SetUpSuite(c *check.C) {
}

func (s *ComputeTestSuite) TestDoImageActivate(c *check.C) {
	image := model.Image{}
	storagePool := model.StoragePool{}
	imageUUID := "docker:badimage"
	client := docker.GetClient(constants.DefaultVersion)
	err := DoImageActivate(image, storagePool, nil, client, imageUUID)
	c.Check(err, check.NotNil)
}

{'fraction_non_alphanumeric': 0.14265799256505576, 'fraction_numerical': 0.007899628252788104, 'mean_word_length': 4.850543478260869, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2824086', 'n_tokens_mistral': 818, 'n_tokens_neox': 788, 'n_words': 144}