tst
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
parent
7449a4a5db
commit
0c98d05ebf
4
build
4
build
@ -1,7 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
ORG_PATH="github.com/coreos"
|
||||
REPO_PATH="${ORG_PATH}/coreos-cloudinit"
|
||||
ORG_PATH="github.com/vtolstov"
|
||||
REPO_PATH="${ORG_PATH}/cloudinit"
|
||||
|
||||
if [ ! -h gopath/src/${REPO_PATH} ]; then
|
||||
mkdir -p gopath/src/${ORG_PATH}
|
||||
|
28
cloudinit.go
28
cloudinit.go
@ -21,20 +21,20 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/config/validate"
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/configdrive"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/file"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/digitalocean"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/ec2"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/proc_cmdline"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/url"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/waagent"
|
||||
"github.com/coreos/coreos-cloudinit/initialize"
|
||||
"github.com/coreos/coreos-cloudinit/network"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config/validate"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/configdrive"
|
||||
"github.com/vtolstov/cloudinit/datasource/file"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/digitalocean"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/ec2"
|
||||
"github.com/vtolstov/cloudinit/datasource/proc_cmdline"
|
||||
"github.com/vtolstov/cloudinit/datasource/url"
|
||||
"github.com/vtolstov/cloudinit/datasource/waagent"
|
||||
"github.com/vtolstov/cloudinit/initialize"
|
||||
"github.com/vtolstov/cloudinit/network"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/openstack"
|
||||
)
|
||||
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
)
|
||||
|
||||
func TestMergeConfigs(t *testing.T) {
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
type rule func(config node, report *Report)
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/test"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/test"
|
||||
)
|
||||
|
||||
func TestFetchMetadata(t *testing.T) {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
)
|
||||
|
||||
type localFile struct {
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -20,10 +20,10 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/test"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/test"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
func TestType(t *testing.T) {
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -20,10 +20,10 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/test"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/test"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
func TestType(t *testing.T) {
|
||||
|
@ -17,7 +17,7 @@ package metadata
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
type MetadataService struct {
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/test"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/test"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
func TestAvailabilityChanges(t *testing.T) {
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/test"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/test"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
func TestType(t *testing.T) {
|
||||
|
@ -17,7 +17,7 @@ package test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
type HttpClient struct {
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -15,8 +15,8 @@
|
||||
package url
|
||||
|
||||
import (
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
)
|
||||
|
||||
type remoteFile struct {
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
)
|
||||
|
||||
type waagent struct {
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/test"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/datasource/test"
|
||||
)
|
||||
|
||||
func TestFetchMetadata(t *testing.T) {
|
||||
|
@ -20,9 +20,9 @@ import (
|
||||
"log"
|
||||
"path"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/network"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/network"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
// CloudConfigFile represents a CoreOS specific configuration option that can generate
|
||||
|
@ -18,9 +18,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/network"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/network"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
type TestUnitManager struct {
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
const DefaultSSHKeyName = "coreos-cloudinit"
|
||||
|
@ -21,8 +21,8 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/datasource"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
func TestEnvironmentApply(t *testing.T) {
|
||||
|
@ -17,7 +17,7 @@ package initialize
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
func SSHImportGithubUser(system_user string, github_user string) error {
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/pkg"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
type UserKey struct {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"errors"
|
||||
"log"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func ParseUserData(contents string) (interface{}, error) {
|
||||
|
@ -17,7 +17,7 @@ package initialize
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestParseHeaderCRLF(t *testing.T) {
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/system"
|
||||
)
|
||||
|
||||
func PrepWorkspace(workspace string) error {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/digitalocean"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/digitalocean"
|
||||
)
|
||||
|
||||
func ProcessDigitalOceanNetconf(config []byte) ([]InterfaceGenerator, error) {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/digitalocean"
|
||||
"github.com/vtolstov/cloudinit/datasource/metadata/digitalocean"
|
||||
)
|
||||
|
||||
func TestParseNameservers(t *testing.T) {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// serviceContents generates the contents for a drop-in unit given the config.
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
const DefaultIpv4Address = "127.0.0.1"
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestEtcdHostsFile(t *testing.T) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// Etcd is a top-level structure which embeds its underlying configuration,
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestEtcdUnits(t *testing.T) {
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
"path"
|
||||
"strconv"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// File is a top-level structure which embeds its underlying configuration,
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestWriteFileUnencodedContent(t *testing.T) {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// flannel is a top-level structure which embeds its underlying configuration,
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestFlannelEnvVars(t *testing.T) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// Fleet is a top-level structure which embeds its underlying configuration,
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestFleetUnits(t *testing.T) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// Locksmith is a top-level structure which embeds its underlying configuration,
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestLocksmithUnits(t *testing.T) {
|
||||
|
@ -21,8 +21,8 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/coreos/coreos-cloudinit/network"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/network"
|
||||
"github.com/vishvananda/netlink"
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
// OEM is a top-level structure which embeds its underlying configuration,
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestOEMFile(t *testing.T) {
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestPlaceUnit(t *testing.T) {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
type UnitManager interface {
|
||||
|
@ -17,7 +17,7 @@ package system
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func TestType(t *testing.T) {
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func testReadConfig(config string) func() (io.Reader, error) {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
"github.com/vtolstov/cloudinit/config"
|
||||
)
|
||||
|
||||
func UserHome(name string) (string, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user