Skip to content

Commit

Permalink
all: Update shelf references
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Olsson <ninjasinventedphysics@gmail.com>
  • Loading branch information
Marcus Olsson committed Aug 11, 2014
1 parent 06d61ca commit 9660ef3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ install:
- sudo make install
- popd

- psql -c 'create database shelftest;' -U postgres
- psql -c 'create database blobstoretest;' -U postgres
- export PGUSER=postgres

- popd
Expand Down
4 changes: 2 additions & 2 deletions blobstore/shelf.go → blobstore/blobstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ func main() {
}
storageDesc = "Postgres"

if err := discoverd.Register("shelf", addr); err != nil {
if err := discoverd.Register("blobstore", addr); err != nil {
log.Fatal(err)
}
}

log.Println("Shelf serving files on " + addr + " from " + storageDesc)
log.Println("Blobstore serving files on " + addr + " from " + storageDesc)
log.Fatal(http.ListenAndServe(addr, handler(fs)))
}
4 changes: 2 additions & 2 deletions blobstore/shelf_test.go → blobstore/blobstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

func TestOSFilesystem(t *testing.T) {
dir, err := ioutil.TempDir("", "shelf")
dir, err := ioutil.TempDir("", "blobstore")
if err != nil {
t.Fatal(err)
}
Expand All @@ -26,7 +26,7 @@ func TestOSFilesystem(t *testing.T) {
}

func TestPostgresFilesystem(t *testing.T) {
dbname := "shelftest"
dbname := "blobstoretest"
if os.Getenv("PGDATABASE") != "" {
dbname = os.Getenv("PGDATABASE")
} else {
Expand Down
8 changes: 4 additions & 4 deletions receiver/flynn-receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ func main() {
log.Fatalln("Unable to connect to controller:", err)
}
// TODO: use discoverd http dialer here?
services, err := discoverd.Services("shelf", discoverd.DefaultTimeout)
services, err := discoverd.Services("blobstore", discoverd.DefaultTimeout)
if err != nil || len(services) < 1 {
log.Fatalf("Unable to discover shelf %q", err)
log.Fatalf("Unable to discover blobstore %q", err)
}
shelfHost := services[0].Addr
blobstoreHost := services[0].Addr

app := os.Args[1]

Expand All @@ -61,7 +61,7 @@ func main() {
fmt.Printf("-----> Building %s...\n", app)

var output bytes.Buffer
slugURL := fmt.Sprintf("http://%s/%s.tgz", shelfHost, random.UUID())
slugURL := fmt.Sprintf("http://%s/%s.tgz", blobstoreHost, random.UUID())
cmd := exec.Command(exec.DockerImage("flynn/slugbuilder", os.Getenv("SLUGBUILDER_IMAGE_ID")), slugURL)
cmd.Stdout = io.MultiWriter(os.Stdout, &output)
cmd.Stderr = os.Stderr
Expand Down

0 comments on commit 9660ef3

Please sign in to comment.