Commit 09796298 authored by Adam Reese's avatar Adam Reese

ref(expansion): move python code out of cmd

parent 01ad0ffa
...@@ -37,7 +37,7 @@ var importFileNames = []string{ ...@@ -37,7 +37,7 @@ var importFileNames = []string{
var validFileName = "../test/ValidContent.yaml" var validFileName = "../test/ValidContent.yaml"
var outputFileName = "../test/ExpectedOutput.yaml" var outputFileName = "../test/ExpectedOutput.yaml"
var archiveFileName = "../test/TestArchive.tar" var archiveFileName = "../test/TestArchive.tar"
var expanderName = "../expansion/expansion.py" var expanderName = "../../../expansion/expansion.py"
type ExpanderTestCase struct { type ExpanderTestCase struct {
Description string Description string
......
...@@ -33,7 +33,7 @@ import ( ...@@ -33,7 +33,7 @@ import (
var port = flag.Int("port", 8080, "Port to listen on") var port = flag.Int("port", 8080, "Port to listen on")
// path to expansion binary // path to expansion binary
var expansionBinary = flag.String("expansion_binary", "../expansion/expansion.py", var expansionBinary = flag.String("expansion_binary", "../../../expansion/expansion.py",
"The path to the expansion binary that will be used to expand the template.") "The path to the expansion binary that will be used to expand the template.")
func main() { func main() {
......
...@@ -26,8 +26,8 @@ import ( ...@@ -26,8 +26,8 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/kubernetes/deployment-manager/pkg/common"
"github.com/kubernetes/deployment-manager/cmd/expandybird/expander" "github.com/kubernetes/deployment-manager/cmd/expandybird/expander"
"github.com/kubernetes/deployment-manager/pkg/common"
"github.com/kubernetes/deployment-manager/pkg/util" "github.com/kubernetes/deployment-manager/pkg/util"
restful "github.com/emicklei/go-restful" restful "github.com/emicklei/go-restful"
...@@ -112,7 +112,7 @@ var ServiceWrapperTestCases = []ServiceWrapperTestCase{ ...@@ -112,7 +112,7 @@ var ServiceWrapperTestCases = []ServiceWrapperTestCase{
} }
func TestServiceWrapper(t *testing.T) { func TestServiceWrapper(t *testing.T) {
backend := expander.NewExpander("../expansion/expansion.py") backend := expander.NewExpander("../../../expansion/expansion.py")
wrapper := NewService(NewExpansionHandler(backend)) wrapper := NewService(NewExpansionHandler(backend))
container := restful.NewContainer() container := restful.NewContainer()
container.ServeMux = http.NewServeMux() container.ServeMux = http.NewServeMux()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment