forked from algorand/go-algorand
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from algorand/master
merge
- Loading branch information
Showing
33 changed files
with
653 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: '🐜 Bug report' | ||
about: 'Report a reproducible bug.' | ||
title: '' | ||
labels: 'new-bug' | ||
--- | ||
<!-- | ||
NOTE: If this issue relates to security, please use the vulnerability disclosure form here: | ||
https://www.algorand.com/resources/blog/security | ||
General, developer or support questions concerning Algorand should be directed to the Algorand Forums https://forum.algorand.org/. | ||
--> | ||
|
||
### Subject of the issue | ||
Describe your issue here. | ||
|
||
### Your environment | ||
* Software version: `algod -v` | ||
* Node status if applicable: `goal node status` | ||
* Operating System details. | ||
* In many cases log files and cadaver files are also useful to include. Since these files may be large, an Algorand developer may request them later. These files may include public addresses that you're participating with. If that is a concern please be sure to scrub that data. | ||
|
||
### Steps to reproduce | ||
Tell us how to reproduce this issue. | ||
|
||
### Expected behaviour | ||
Tell us what should happen | ||
|
||
### Actual behaviour | ||
Tell us what happens instead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: '🔔 Feature Request' | ||
about: 'Suggestions for how we can improve the algorand platform.' | ||
title: '' | ||
labels: 'new-feature-request' | ||
--- | ||
<!-- | ||
NOTE: If this issue relates to security, please use the vulnerability disclosure form here: | ||
https://www.algorand.com/resources/blog/security | ||
General, developer or support questions concerning Algorand should be directed to the Algorand Forums https://forum.algorand.org/. | ||
--> | ||
|
||
<!-- | ||
This project is focused on low level platform concerns. A good feature request would be related | ||
to protocol and network usage, debugging and monitoring tools, and goal commands. | ||
Higher level suggestions relating to layer 2 applications (like wallet apps) are not appropriate here. | ||
--> | ||
**Is your feature request related to a problem? Please describe.** | ||
|
||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
|
||
A clear and concise description of what you want to happen. | ||
|
||
**Additional context** | ||
|
||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: '❓ Question' | ||
about: 'General questions related to the algorand platform.' | ||
title: '' | ||
labels: 'question' | ||
--- | ||
<!-- | ||
NOTE: If this issue relates to security, please use the vulnerability disclosure form here: | ||
https://www.algorand.com/resources/blog/security | ||
This issue tracker is not appropriate for most questions. | ||
If your question does not involve a compiler it probably shouldn't be asked here. | ||
General, developer or support questions concerning Algorand should be directed to the Algorand Forums https://forum.algorand.org/. | ||
Additional information is available here: https://developer.algorand.org/ | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- | ||
Thanks for submitting a pull request! We appreciate the time and effort you spent to get this far. | ||
If you haven't already, please make sure that you've reviewed the CONTRIBUTING guide: | ||
https://github.com/algorand/go-algorand/blob/master/CONTRIBUTING.md#code-guidelines | ||
In particular ensure that you've run the following: | ||
* make generate | ||
* make sanity (which runs make fmt, make lint, make fix and make vet) | ||
It is also a good idea to run tests: | ||
* make test | ||
* make integration | ||
--> | ||
|
||
## Summary | ||
|
||
Explain the goal of this change and what problem it is solving. | ||
|
||
## Test Plan | ||
|
||
How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/etc/apt/apt.conf.d/50algorand-upgrades | ||
/etc/apt/apt.conf.d/51algorand-upgrades | ||
/var/lib/algorand/genesis.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Copyright (C) 2019 Algorand, Inc. | ||
// This file is part of go-algorand | ||
// | ||
// go-algorand is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as | ||
// published by the Free Software Foundation, either version 3 of the | ||
// License, or (at your option) any later version. | ||
// | ||
// go-algorand is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with go-algorand. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
package logging | ||
|
||
import ( | ||
"io/ioutil" | ||
"os" | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func Test_loadTelemetryConfig(t *testing.T) { | ||
|
||
sample := TelemetryConfig{ | ||
Enable: true, | ||
GUID: "guid", | ||
URI: "elastic.algorand.com", | ||
MinLogLevel: 4, | ||
ReportHistoryLevel: 4, | ||
LogHistoryDepth: 100, | ||
UserName: "telemetry-v9", | ||
Password: "oq%$FA1TOJ!yYeMEcJ7D688eEOE#MGCu", | ||
} | ||
|
||
a := require.New(t) | ||
ourPath, err := os.Getwd() | ||
a.NoError(err) | ||
configsPath := filepath.Join(ourPath, "../test/testdata/configs/logging/logging.config.example") | ||
|
||
config, err := loadTelemetryConfig(configsPath) | ||
a.NoError(err) | ||
|
||
a.Equal(sample.Enable, config.Enable) | ||
a.Equal(sample.GUID, config.GUID) | ||
a.Equal(sample.URI, config.URI) | ||
a.Equal(sample.MinLogLevel, config.MinLogLevel) | ||
a.Equal(sample.ReportHistoryLevel, config.ReportHistoryLevel) | ||
a.Equal(sample.UserName, config.UserName) | ||
a.Equal(sample.Password, config.Password) | ||
|
||
} | ||
|
||
func Test_CreateSaveLoadTelemetryConfig(t *testing.T) { | ||
|
||
testDir := os.Getenv("TESTDIR") | ||
|
||
if testDir == "" { | ||
testDir, _ = ioutil.TempDir("", "tmp") | ||
} | ||
|
||
a := require.New(t) | ||
|
||
configsPath := filepath.Join(testDir, "logging.config") | ||
config1 := createTelemetryConfig() | ||
|
||
err := config1.Save(configsPath) | ||
a.NoError(err) | ||
|
||
config2, err := loadTelemetryConfig(configsPath) | ||
a.NoError(err) | ||
|
||
a.Equal(config1.Enable, config2.Enable) | ||
a.Equal(config1.URI, config2.URI) | ||
a.Equal(config1.Name, config2.Name) | ||
a.Equal(config1.GUID, config2.GUID) | ||
a.Equal(config1.MinLogLevel, config2.MinLogLevel) | ||
a.Equal(config1.ReportHistoryLevel, config2.ReportHistoryLevel) | ||
a.Equal(config1.LogHistoryDepth, config2.LogHistoryDepth) | ||
a.Equal(config1.FilePath, "") | ||
a.Equal(configsPath, config2.FilePath) | ||
a.Equal(config1.ChainID, config2.ChainID) | ||
a.Equal(config1.SessionGUID, config2.SessionGUID) | ||
a.Equal(config1.UserName, config2.UserName) | ||
a.Equal(config1.Password, config2.Password) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.