Skip to content

Commit

Permalink
Merge pull request #17 from taubyte/13-cleanup
Browse files Browse the repository at this point in the history
Clean up before open sourcing
  • Loading branch information
samyfodil authored Jul 31, 2023
2 parents 0697a9f + 7ca55cf commit 910cf9f
Show file tree
Hide file tree
Showing 44 changed files with 220 additions and 1,651 deletions.
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright 2020 Taubyte

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# dreamland

[![Release](https://img.shields.io/github/release/taubyte/dreamland.svg)](https://github.com/taubyte/dreamland/releases)
[![License](https://img.shields.io/github/license/taubyte/dreamland)](LICENSE)
[![Go Report Card](https://goreportcard.com/badge/taubyte/dreamland)](https://goreportcard.com/report/taubyte/dreamland)
[![GoDoc](https://godoc.org/github.com/taubyte/dreamland?status.svg)](https://pkg.go.dev/github.com/taubyte/dreamland)
[![Discord](https://img.shields.io/discord/973677117722202152?color=%235865f2&label=discord)](https://discord.gg/taubyte)

`dreamland` is a tool that let you run a full Taubyte-based Cloud locally. Documentation: [https://tau.how](https://tau.how).
17 changes: 6 additions & 11 deletions cli/new/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,13 @@ func startUniverses(c *cli.Context) (err error) {
return err
}

uid := c.String("id")
for _, universe := range c.StringSlice("universes") {
var u commonDreamland.Universe
if uid == "" {
u = services.Multiverse(universe)
} else {
u = services.MultiverseWithConfig(services.UniverseConfig{
Name: universe,
KeepRoot: c.Bool("keep"),
Id: uid,
})
}
u = services.Multiverse(services.UniverseConfig{
Name: universe,
Id: c.String("id"),
KeepRoot: c.Bool("keep"),
})
err = u.StartWithConfig(config)
if err != nil {
return err
Expand All @@ -223,7 +218,7 @@ func startUniverses(c *cli.Context) (err error) {

func startEmptyUniverses(c *cli.Context) (err error) {
for _, universe := range c.StringSlice("universes") {
u := services.Multiverse(universe)
u := services.Multiverse(services.UniverseConfig{Name: universe})
err = u.StartWithConfig(&commonDreamland.Config{})
if err != nil {
return err
Expand Down
8 changes: 4 additions & 4 deletions cli/tests/universe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var services = []string{"seer", "auth", "patrick", "tns", "monkey", "hoarder", "
func TestKillService(t *testing.T) {
t.Skip("this test needs to be redone")
api.BigBang()
u := dreamland.Multiverse("KillService")
u := dreamland.Multiverse(dreamland.UniverseConfig{Name: t.Name()})
err := u.StartWithConfig(&common.Config{
Services: map[string]commonIface.ServiceConfig{},
Clients: map[string]commonIface.ClientConfig{},
Expand Down Expand Up @@ -88,7 +88,7 @@ func TestKillSimple(t *testing.T) {
statusName := fmt.Sprintf("%s@%s", testSimpleName, universeName)

api.BigBang()
u := dreamland.Multiverse(universeName)
u := dreamland.Multiverse(dreamland.UniverseConfig{Name: t.Name()})
err := u.StartWithConfig(&common.Config{
Clients: map[string]commonIface.ClientConfig{},
Simples: map[string]common.SimpleConfig{
Expand Down Expand Up @@ -185,7 +185,7 @@ func TestKillSimple(t *testing.T) {
}

func TestUniverseAll(t *testing.T) {
u := dreamland.Multiverse("single")
u := dreamland.Multiverse(dreamland.UniverseConfig{Name: t.Name()})
defer u.Stop()
err := u.StartAll()
if err != nil {
Expand Down Expand Up @@ -233,7 +233,7 @@ func TestUniverseAll(t *testing.T) {
}

func TestMultipleServices(t *testing.T) {
u := dreamland.Multiverse("multiple")
u := dreamland.Multiverse(dreamland.UniverseConfig{Name: t.Name()})
defer u.Stop()
err := u.StartWithConfig(&common.Config{
Services: map[string]commonIface.ServiceConfig{
Expand Down
130 changes: 0 additions & 130 deletions fixtures/attach_prod_project.go

This file was deleted.

50 changes: 0 additions & 50 deletions fixtures/attach_prod_project_test.go

This file was deleted.

116 changes: 0 additions & 116 deletions fixtures/clear_repos.go

This file was deleted.

Loading

0 comments on commit 910cf9f

Please sign in to comment.