Skip to content

Commit

Permalink
update tau to v1.1.4 (#45)
Browse files Browse the repository at this point in the history
Updates tau version to v1.1.4, but also the underlying deps like p2p.
Few tests were fixed
README was updated
  • Loading branch information
samyfodil authored Mar 25, 2024
1 parent 208c335 commit b1239f0
Show file tree
Hide file tree
Showing 8 changed files with 397 additions and 518 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# Dreamland

<h2 align="center">
<a href="https://taubyte.com" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="images/dream-logo-box-v2.png">
<img width="80" src="images/dream-logo-box-v2.png" alt="Dreamland">
</picture>
</a>
<br />
Dreamland

***Local Coding Equals Global Production***
</h2>
<div align="center">

[![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)
[![Discord](https://img.shields.io/discord/973677117722202152?color=%235865f2&label=discord)](https://discord.gg/wM8mdskh)

</div>

![](images/dream-banner.png)

Dreamland is a CLI tool that forms part of Taubyte's suite of development tools, designed to create local cloud environments that reflect the autonomous nature of Taubyte's cloud computing solution. By leveraging [libdream](https://github.com/taubyte/tau/tree/main/libdream), Dreamland provides an API for real-time configuration and testing, enabling developers and platform engineers to simulate and interact with applications in an environment that closely aligns with the autonomy and scalability of Taubyte's approach to cloud computing. This tool facilitates the development and testing process, aligning with Taubyte's principle of "Infrastructure's Autopilot - Local Coding Equals Global Production," and empowers users to innovate beyond the constraints of traditional cloud infrastructure management.

`Dreamland` is a local development tool that lets you run a full-fledged Taubyte-based Cloud on your machine. For documentation, visit [https://tau.how](https://tau.how).

## Installation

Expand Down
4 changes: 2 additions & 2 deletions cli/tests/universe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestKillSimple(t *testing.T) {
statusName := fmt.Sprintf("%s@%s", testSimpleName, universeName)

api.BigBang()
u := libdream.New(libdream.UniverseConfig{Name: t.Name()})
u := libdream.New(libdream.UniverseConfig{Name: universeName})
err := u.StartWithConfig(&libdream.Config{
Simples: map[string]libdream.SimpleConfig{
testSimpleName: {},
Expand Down Expand Up @@ -125,7 +125,7 @@ func TestKillSimple(t *testing.T) {
return
}

err = u.KillNodeByNameID("client", simple.PeerNode().ID().Pretty())
err = u.KillNodeByNameID("client", simple.PeerNode().ID().String())
if err != nil {
t.Error(err)
return
Expand Down
191 changes: 94 additions & 97 deletions go.mod

Large diffs are not rendered by default.

664 changes: 271 additions & 393 deletions go.sum

Large diffs are not rendered by default.

Binary file added images/dream-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dream-logo-box-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions service/api/les_miserables_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ func (srv *multiverseService) apiHandlerLesMiesrable(ctx httpIface.Context) (int
}

for i, n := range u.All() {
_cat, ok := u.Lookup(n.ID().Pretty())
_cat, ok := u.Lookup(n.ID().String())
if !ok {
continue
}

cat := _cat.Name
name := fmt.Sprintf("%s@%s", cat, u.Name())
pid := n.ID().Pretty()
pid := n.ID().String()
ret.Categories = append(ret.Categories, &EchartCat{
Name: cat,
})
Expand All @@ -79,10 +79,10 @@ func (srv *multiverseService) apiHandlerLesMiesrable(ctx httpIface.Context) (int
})

for _, l := range n.Peer().Peerstore().Peers() {
if l.Pretty() != pid {
if l.String() != pid {
ret.Links = append(ret.Links, &EchartLinks{
Source: pid,
Target: l.Pretty(),
Target: l.String(),
})
}
}
Expand Down
23 changes: 4 additions & 19 deletions service/universe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package http

import (
"context"
"fmt"
"testing"
"time"

Expand All @@ -24,14 +23,15 @@ import (
)

func TestRoutes(t *testing.T) {
univerName := "dreamland-http"
// start multiverse
err := api.BigBang()
if err != nil {
t.Errorf("Failed big bang with error: %v", err)
return
}

u := libdream.New(libdream.UniverseConfig{Name: t.Name()})
u := libdream.New(libdream.UniverseConfig{Name: univerName})
defer u.Stop()

err = u.StartWithConfig(&libdream.Config{
Expand Down Expand Up @@ -68,7 +68,7 @@ func TestRoutes(t *testing.T) {
return
}

universe := client.Universe("dreamland-http")
universe := client.Universe(univerName)

// Create simple called test1
err = universe.Inject(inject.Simple("test1", &libdream.SimpleConfig{}))
Expand All @@ -93,20 +93,6 @@ func TestRoutes(t *testing.T) {
return
}

// Should not fail
err = universe.KillService("seer")
if err != nil {
t.Errorf("Failed kill call with error: %v", err)
return
}

// Should fail
err = universe.KillService("seer")
if err == nil {
t.Error("Expected killing seer again to fail")
return
}

// Should fail
err = universe.Inject(inject.Fixture("should fail", "dne"))
if err == nil {
Expand All @@ -119,11 +105,10 @@ func TestRoutes(t *testing.T) {
t.Error(err)
return
}
_, ok := test["dreamland-http"]
_, ok := test[univerName]
if ok == false {
t.Error("Did not find universe in status")
return
}

fmt.Println("-------------------END-------------")
}

0 comments on commit b1239f0

Please sign in to comment.