Categorygithub.com/libkermit/compose
modulepackage
0.0.0-20171122111507-c04e39c026ad
Repository: https://github.com/libkermit/compose.git
Documentation: pkg.go.dev

# README

Libkermit

GoDoc Build Status Go Report Card License codecov

When libermit meet with libcompose.

Note: This is experimental and not even implemented yet. You are on your own right now

Package compose

This package holds functions and structs to ease docker uses.

package yours

import (
    "testing"

    "github.com/libkermit/docker/compose"
)

func TestItMyFriend(t *testing.T) {
    project, err := compose.CreateProject("simple", "./assets/simple.yml")
    if err != nil {
        t.Fatal(err)
    }
    err = project.Start()
	if err != nil {
		t.Fatal(err)
	}

    // Do your stuff

    err = project.Stop()
	if err != nil {
		t.Fatal(err)
	}
}

Package compose/testing

This package map the compose package but takes a *testing.T struct on all methods. The idea is to write even less. Let's write the same example as above.

package yours

import (
    "testing"

    docker "github.com/libkermit/docker/compose/testing"
)

func TestItMyFriend(t *testing.T) {
    project := compose.CreateProject(t, "simple", "./assets/simple.yml")
    project.Start(t)

    // Do your stuff

    project.Stop(t)
}

Other packages to come

  • suite : functions and structs to setup tests suites.

# Packages

Package check aims to provide simple "helper" methods to ease the use of compose (through libcompose) in (integration) tests using the go-check package.
No description provided by the author
Package testing aims to provide simple "helper" methods to ease the use of compose (through libcompose) in (integration) tests using built-in testing.

# Functions

CreateProject creates a compose project with the given name based on the specified compose files.

# Structs

Project holds compose related project attributes.