Moving last things from /tests, removing dead code

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2021-01-19 15:34:54 +01:00
parent 46935b0300
commit 6859413a5d
12 changed files with 11 additions and 57 deletions

View File

@ -54,7 +54,7 @@ import (
"github.com/docker/compose-cli/api/context/store"
"github.com/docker/compose-cli/api/errdefs"
"github.com/docker/compose-cli/cli/cmd"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
const (

View File

@ -23,7 +23,7 @@ import (
"gotest.tools/v3/icmd"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
const (

View File

@ -31,7 +31,7 @@ import (
"gotest.tools/v3/icmd"
"gotest.tools/v3/poll"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
var binDir string

View File

@ -30,7 +30,7 @@ import (
"gotest.tools/v3/golden"
"gotest.tools/v3/icmd"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
var binDir string

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package framework
package main
import (
"io/ioutil"

View File

@ -27,7 +27,7 @@ import (
"gotest.tools/v3/assert"
"gotest.tools/v3/icmd"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
var binDir string

View File

@ -24,7 +24,7 @@ import (
"gotest.tools/v3/icmd"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
func TestLocalComposeLogs(t *testing.T) {

View File

@ -29,7 +29,7 @@ import (
"gotest.tools/v3/poll"
"github.com/docker/compose-cli/cli/cmd"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
var binDir string

View File

@ -30,7 +30,7 @@ import (
"gotest.tools/v3/icmd"
"gotest.tools/v3/poll"
. "github.com/docker/compose-cli/tests/framework"
. "github.com/docker/compose-cli/utils/e2e"
)
func TestKillChildProcess(t *testing.T) {

View File

@ -1,5 +0,0 @@
services:
nginx:
image: nginx
ports:
- "80:80"

View File

@ -1,42 +0,0 @@
/*
Copyright 2020 Docker Compose CLI authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package framework
import (
"context"
"io/ioutil"
"os"
)
// TestCLI is a helper struct for CLI tests.
type TestCLI struct {
ctx context.Context
writer *os.File
reader *os.File
}
// Context returns a configured context
func (c *TestCLI) Context() context.Context {
return c.ctx
}
// GetStdOut returns the output of the command
func (c *TestCLI) GetStdOut() string {
_ = c.writer.Close()
out, _ := ioutil.ReadAll(c.reader)
return string(out)
}

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package framework
package e2e
import (
"errors"
@ -51,6 +51,7 @@ func init() {
}
// E2eCLI is used to wrap the CLI for end to end testing
// nolint stutter
type E2eCLI struct {
BinDir string
ConfigDir string