Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

(MAINT) fix imports and tests

Fixes references to old repo name and minor tweaks to tests.
  • Loading branch information...
johnmccabe committed May 2, 2017
1 parent 2610440 commit a47f3193dd9a2de4171916d323c16fa3cf4647b1
@@ -3,10 +3,10 @@ package host
import (
"fmt"

"github.com/puppetlabs/transparent-containers/cli/capabilities/payloadfilter"
"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/payloadfilter"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
gopsutilhost "github.com/shirou/gopsutil/host"
)

@@ -1,9 +1,9 @@
package capabilities

import (
"github.com/puppetlabs/transparent-containers/cli/capabilities/host"
"github.com/puppetlabs/transparent-containers/cli/capabilities/label"
"github.com/puppetlabs/transparent-containers/cli/capabilities/ospackages"
"github.com/puppetlabs/lumogon/capabilities/host"
"github.com/puppetlabs/lumogon/capabilities/label"
"github.com/puppetlabs/lumogon/capabilities/ospackages"
)

// Init exists to allow capabilities init() functions to run when
@@ -4,11 +4,11 @@ import (
"context"
"fmt"

"github.com/puppetlabs/transparent-containers/cli/capabilities/payloadfilter"
"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/payloadfilter"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

// Label contains a map of Docker labels
@@ -1,11 +1,11 @@
package ospackages

import (
"github.com/puppetlabs/transparent-containers/cli/capabilities/payloadfilter"
"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/payloadfilter"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

var apkDescription = `The apk capability returns all apk-managed package
@@ -1,11 +1,11 @@
package ospackages

import (
"github.com/puppetlabs/transparent-containers/cli/capabilities/payloadfilter"
"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/payloadfilter"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

var dpkgDescription = `The dpkg capability returns all dpkg-managed package
@@ -4,9 +4,9 @@ import (
"context"
"fmt"

"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/utils"
)

func runPackageCmd(client dockeradapter.Harvester, containerID string, cmd []string) (map[string]string, error) {
@@ -8,8 +8,8 @@ import (
"fmt"

dockertypes "github.com/docker/docker/api/types"
"github.com/puppetlabs/transparent-containers/cli/test/helper"
"github.com/puppetlabs/transparent-containers/cli/test/mocks"
"github.com/puppetlabs/lumogon/test/helper"
"github.com/puppetlabs/lumogon/test/mocks"
)

// Uses generic successful mock functions from packagehelpers_test.go
@@ -6,7 +6,7 @@ import (
"context"

dockertypes "github.com/docker/docker/api/types"
"github.com/puppetlabs/transparent-containers/cli/test/mocks"
"github.com/puppetlabs/lumogon/test/mocks"
)

func successfulContainerExecCreateFn(ctx context.Context, containerID string, cmd []string, attachStdout bool, attachStderr bool) (dockertypes.IDResponse, error) {
@@ -1,11 +1,11 @@
package ospackages

import (
"github.com/puppetlabs/transparent-containers/cli/capabilities/payloadfilter"
"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/payloadfilter"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

var rpmDescription = `The rpm capability returns all rpm-managed package
@@ -6,10 +6,10 @@ import (

"os"

"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
"github.com/puppetlabs/lumogon/utils"
)

// CapabilitiesRegistry contains a record of each registered capability
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/puppetlabs/transparent-containers/cli/scheduler"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/scheduler"
"github.com/puppetlabs/lumogon/types"
"github.com/spf13/cobra"
)

@@ -5,7 +5,7 @@ import (

"os"

"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/spf13/cobra"
)

@@ -3,11 +3,11 @@ package cmd
import (
"os"

"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/harvester"
"github.com/puppetlabs/transparent-containers/cli/harvester/rpcreceiver"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/harvester"
"github.com/puppetlabs/lumogon/harvester/rpcreceiver"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"

"github.com/spf13/cobra"
)
@@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/spf13/cobra"
)

@@ -3,7 +3,7 @@ package cmd
import (
"os"

"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/lumogon/logging"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
@@ -6,8 +6,8 @@ import (

"fmt"

"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/version"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/version"
"github.com/spf13/cobra"
)

@@ -7,12 +7,12 @@ import (

"encoding/json"

"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/storage"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/transparent-containers/cli/version"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/storage"
"github.com/puppetlabs/lumogon/types"
"github.com/puppetlabs/lumogon/utils"
"github.com/puppetlabs/lumogon/version"
)

var mu sync.Mutex
@@ -3,8 +3,8 @@ package collector
import (
"time"

"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/transparent-containers/cli/version"
"github.com/puppetlabs/lumogon/types"
"github.com/puppetlabs/lumogon/version"
)

// NewReport gathers data from all capabilities
@@ -7,8 +7,8 @@ import (
dockertypes "github.com/docker/docker/api/types"
dockercontainer "github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/utils"
)

// Client is a Docker (currently local) ContainerRuntime
@@ -6,7 +6,7 @@ import (
"fmt"
"io"

"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/lumogon/logging"
)

const (
@@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/puppetlabs/transparent-containers/cli/test/helper"
"github.com/puppetlabs/lumogon/test/helper"
)

var filterDockerStreamTests = []struct {
@@ -1,4 +1,4 @@
package: github.com/puppetlabs/transparent-containers/cli
package: github.com/puppetlabs/lumogon
import:
- package: github.com/docker/docker
subpackages:
@@ -5,10 +5,10 @@ import (

"sync"

"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/harvester/rpcreceiver"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/harvester/rpcreceiver"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

// RunAttachedHarvester handles gathering AttachedCapabilities from the target containers.
@@ -7,10 +7,10 @@ import (
"os"

dockercontainer "github.com/docker/docker/api/types/container"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
"github.com/puppetlabs/lumogon/utils"
)

// AttachedContainer is a container attached to a running target container
@@ -3,8 +3,8 @@ package harvester
import (
"time"

"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/lumogon/types"
"github.com/puppetlabs/lumogon/utils"
)

// GenerateContainerReport gathers capabilities data for a specific container
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/types"
)

func TestGenerateContainerReport(t *testing.T) {
@@ -5,10 +5,10 @@ import (

"sync"

"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

// RunDockerAPIHarvester handles gathering DockerAPICapabilities from the target containers.
@@ -4,8 +4,8 @@ import (
"log"
"net/rpc"

"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

// SendResult submits the ContainerReport populated with the output from each
@@ -7,8 +7,8 @@ import (

"fmt"

"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
)

// Ack contains the reponse from the RPC Receiver server
@@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/puppetlabs/transparent-containers/cli/capabilities"
"github.com/puppetlabs/transparent-containers/cli/cmd"
"github.com/puppetlabs/lumogon/capabilities"
"github.com/puppetlabs/lumogon/cmd"
)

func main() {
@@ -6,13 +6,13 @@ import (

"sync"

"github.com/puppetlabs/transparent-containers/cli/capabilities/registry"
"github.com/puppetlabs/transparent-containers/cli/collector"
"github.com/puppetlabs/transparent-containers/cli/dockeradapter"
"github.com/puppetlabs/transparent-containers/cli/harvester"
"github.com/puppetlabs/transparent-containers/cli/logging"
"github.com/puppetlabs/transparent-containers/cli/types"
"github.com/puppetlabs/transparent-containers/cli/utils"
"github.com/puppetlabs/lumogon/capabilities/registry"
"github.com/puppetlabs/lumogon/collector"
"github.com/puppetlabs/lumogon/dockeradapter"
"github.com/puppetlabs/lumogon/harvester"
"github.com/puppetlabs/lumogon/logging"
"github.com/puppetlabs/lumogon/types"
"github.com/puppetlabs/lumogon/utils"
)

// Scheduler runs in the Lumogon client container and handles gathering
Oops, something went wrong.

0 comments on commit a47f319

Please sign in to comment.
You can’t perform that action at this time.