Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test2 #2

Open
wants to merge 85 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
d54474e
format changelog
rboyer Feb 19, 2020
5d2805c
tls: support tls 1.3 (#7325)
hanshasselberg Feb 19, 2020
70cd330
Update CHANGELOG
hanshasselberg Feb 20, 2020
db24f51
update bindata_assetfs.go
hashicorp-ci Feb 20, 2020
2cf0a3c
Release v1.7.1
hashicorp-ci Feb 20, 2020
40ac676
Putting source back into Dev Mode
hashicorp-ci Feb 20, 2020
96d6ee4
Fix session backwards incompatibility with 1.6.x and earlier.
mkeeler Mar 5, 2020
22cead1
Update CHANGELOG.md
mkeeler Mar 5, 2020
190308f
ui: Enable recovery from an unreachable datacenter (500 error) (#7404)
johncowen Mar 9, 2020
a3aedcb
Update intention precedence table in the docs (#7421)
mkeeler Mar 10, 2020
e5770de
Update MSP token and filtering (#7431)
freddygv Mar 11, 2020
35cc29f
Update CHANGELOG.md
freddygv Mar 11, 2020
77d5b93
agent/txn_endpoint: configure max txn request length (#7388)
findkim Mar 5, 2020
81d5850
Update CHANGELOG.md
findkim Mar 5, 2020
3daa900
docs: add docs for kv_max_value_size (#7405)
hanshasselberg Mar 9, 2020
5a650ee
agent: take Prometheus MIME-type header into account (#7371)
pierresouchay Mar 3, 2020
35fee6d
agent: log error when agent crashes in an early stage (#7411)
johscheuer Mar 9, 2020
70a8902
command: change delim in columnize to funny node names (#6652)
dzeban Mar 9, 2020
3aad4b5
agent: configuration reload preserves check's statuses for services (…
pierresouchay Mar 9, 2020
006ed9d
Add stub methods for ACL/segment bug fix from enterprise
kyhavlov Mar 2, 2020
05bf06c
Adds http_config.response_headers to the UI headers plus tests (#7369)
johncowen Mar 3, 2020
fb697a1
update changelog
rboyer Mar 10, 2020
a64545a
Update CHANGELOG.md
johncowen Mar 12, 2020
4affae6
Update CHANGELOG.md
freddygv Mar 12, 2020
5ecfb95
ui: Alter position of logic for showing the Round Trip Time tab to pr…
johncowen Mar 4, 2020
fdab8b6
ui: Coordinates don't require a nspace, so don't expect one in the re…
johncowen Mar 4, 2020
cc2929a
Update namespace docs for some new CLI commands (#7435)
mkeeler Mar 16, 2020
1f2dd76
Fix ACL mode advertisement and detection (#7451)
mkeeler Mar 16, 2020
1ad010e
Update CHANGELOG.md
mkeeler Mar 16, 2020
1a27255
Don’t pass `-u` to get get inside Go build image dockerfile (#7455)
mkeeler Mar 16, 2020
0cd01dd
update bindata_assetfs.go
hashicorp-ci Mar 16, 2020
9ea1a20
Release v1.7.2
hashicorp-ci Mar 16, 2020
135934e
Putting source back into Dev Mode
hashicorp-ci Mar 16, 2020
7490279
Log "vew version available" message at info level (#7462)
crhino Mar 17, 2020
1b65eb2
Update CHANGELOG.md
crhino Mar 17, 2020
cc13cc4
agent/xds: Update mesh gateway to use service router timeout (#7444)
findkim Mar 17, 2020
9c40fed
Update CHANGELOG.md
findkim Mar 17, 2020
f5773f3
Add PolicyReadByName for API (#6615)
abaez Mar 25, 2020
9252b8c
Update CHANGELOG.md
mkeeler Mar 25, 2020
f88cc88
Update CHANGELOG.md
mkeeler Mar 26, 2020
4461b88
Add optional JSON format to the ACL CLI commands output (#7198)
mkeeler Mar 26, 2020
1de77ff
Exposing paths isn't an upstream configuration (#7515)
freddygv Mar 26, 2020
0675669
Add docs for v1/acl/policy/name endpoint (#7501)
mkeeler Mar 27, 2020
2eaf16f
Ensure server requirements checks are done against ALL known se… (#7491)
mkeeler Mar 27, 2020
8837736
ui: Ensure blocking query configuration is passed through to findInst…
johncowen Mar 30, 2020
4c1e50d
FIX flaky test: TestAPI_AgentMonitorJSON
pierresouchay Mar 30, 2020
2b04fe4
ui: Use the `each key=""` parameter to force ember to reuse DOM (#7550)
johncowen Mar 31, 2020
5223a09
ui: Fix token duplication bug (#7552)
johncowen Apr 1, 2020
a5029c1
Fix flapping of mesh gateway connect-service watches (#7575)
crhino Apr 2, 2020
3ca8ee4
Update CHANGELOG.md
crhino Apr 2, 2020
b4191c3
Ensure that token clone copies the roles (#7577)
mkeeler Apr 2, 2020
ea53fc6
Update CHANGELOG.md
mkeeler Apr 13, 2020
cfab77e
Allow the bootstrap endpoint to be disabled in enterprise. (#7614)
mkeeler Apr 14, 2020
7223c42
Update the Client code to use the common version checking infra… (#7558)
mkeeler Apr 14, 2020
df52e80
Update CHANGELOG.md
mkeeler Apr 14, 2020
20b6da2
Update CHANGELOG.md
mkeeler Apr 14, 2020
040cf26
Update CHANGELOG.md
mkeeler Apr 14, 2020
d9734dc
ui: Lazily detect HTTP protocol (#7644)
johncowen Apr 15, 2020
6f0db01
Fix check deletion in anti-entropy sync (#7690)
freddygv Apr 23, 2020
4ddbce2
Update CHANGELOG.md
johncowen Apr 29, 2020
51303df
ui: Fix using 'ui-like' KVs when using an empty default nspace (#7734)
johncowen Apr 30, 2020
e6a4e3f
Update CHANGELOG.md
johncowen Apr 30, 2020
2f7d097
oss changes for network area connection pooling (#7746)
hanshasselberg May 4, 2020
e58c665
Update mapstructure to v1.2.3
mkeeler Apr 27, 2020
400edd7
Some boilerplate to allow for ACL Bootstrap disabling configurability
mkeeler Apr 28, 2020
fce86ad
Updates to allow for using an enterprise specific token as the agents…
mkeeler May 4, 2020
82074b8
Update enterprise configurations to be in OSS
mkeeler Apr 28, 2020
d8e8bb2
Merge pull request #7770 from hashicorp/backport/7714
mkeeler May 4, 2020
b2f010a
Update CHANGELOG.md
mkeeler May 5, 2020
858a446
Update CHANGELOG.md
mkeeler May 5, 2020
95a31b2
Construct a default destination if one does not exist for service-rou…
crhino May 5, 2020
3cf29d4
Update CHANGELOG.md
crhino May 5, 2020
7a8034b
cli: fix usage of gzip.Reader to better detect corrupt snapshots duri…
rboyer Apr 24, 2020
a7f8a0f
cli: ensure that 'snapshot save' is fsync safe and also only writes t…
rboyer Apr 24, 2020
3f461f4
Downgrade go-testing-interface to support go1.13.x
dnephin May 5, 2020
46110cd
Merge pull request #7785 from hashicorp/cherry-pick-snapshot-fixes
dnephin May 5, 2020
a7dace2
agent: don't let left nodes hold onto their node-id (#7775)
hanshasselberg May 5, 2020
783a0c8
segments: oss changes for enterprise network area changes (#7786) (#7…
hanshasselberg May 5, 2020
420b1ca
Update CHANGELOG.md
hanshasselberg May 5, 2020
d89c47e
Update CHANGELOG.md
hanshasselberg May 5, 2020
2da941c
Update CHANGELOG.md
hanshasselberg May 5, 2020
5e6509e
update bindata_assetfs.go
hashicorp-ci May 5, 2020
8b4a3d9
Release v1.7.3
hashicorp-ci May 5, 2020
2ff8d44
Putting source back into Dev Mode
hashicorp-ci May 5, 2020
6d860f9
Merge remote-tracking branch 'origin/master' into test2
alvin-huang May 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 81 additions & 81 deletions agent/bindata_assetfs.go

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions agent/txn_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ func TestTxnEndpoint_Bad_Size_Item(t *testing.T) {
a.Shutdown()
})

t.Run("exceeds configured max txn len", func(t *testing.T) {
a := NewTestAgent(t, t.Name(), "limits = { txn_max_req_len = 700000 }")
testIt(t, a, false)
a.Shutdown()
})

t.Run("exceeds default max kv value size", func(t *testing.T) {
a := NewTestAgent(t, t.Name(), "limits = { txn_max_req_len = 123456789 }")
testIt(t, a, false)
a.Shutdown()
})

t.Run("allowed", func(t *testing.T) {
a := NewTestAgent(t, `
limits = {
Expand Down Expand Up @@ -156,6 +168,18 @@ func TestTxnEndpoint_Bad_Size_Net(t *testing.T) {
a.Shutdown()
})

t.Run("exceeds configured max txn len", func(t *testing.T) {
a := NewTestAgent(t, t.Name(), "limits = { txn_max_req_len = 700000 }")
testIt(a, false)
a.Shutdown()
})

t.Run("exceeds default max kv value size", func(t *testing.T) {
a := NewTestAgent(t, t.Name(), "limits = { txn_max_req_len = 123456789 }")
testIt(a, false)
a.Shutdown()
})

t.Run("allowed", func(t *testing.T) {
a := NewTestAgent(t, `
limits = {
Expand Down
59 changes: 59 additions & 0 deletions command/acl/authmethod/create/authmethod_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/hashicorp/consul/testrpc"
"github.com/hashicorp/go-uuid"
"github.com/mitchellh/cli"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

// activate testing auth method
Expand Down Expand Up @@ -269,6 +270,64 @@ func TestAuthMethodCreateCommand_JSON(t *testing.T) {
})
}

func TestAuthMethodCreateCommand_JSON(t *testing.T) {
t.Parallel()

testDir := testutil.TempDir(t, "acl")
defer os.RemoveAll(testDir)

a := agent.NewTestAgent(t, t.Name(), `
primary_datacenter = "dc1"
acl {
enabled = true
tokens {
master = "root"
}
}`)

defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")

t.Run("type required", func(t *testing.T) {
args := []string{
"-http-addr=" + a.HTTPAddr(),
"-token=root",
"-format=json",
}

ui := cli.NewMockUi()
cmd := New(ui)

code := cmd.Run(args)
require.Equal(t, code, 1)
require.Contains(t, ui.ErrorWriter.String(), "Missing required '-type' flag")
})

t.Run("create testing", func(t *testing.T) {
args := []string{
"-http-addr=" + a.HTTPAddr(),
"-token=root",
"-type=testing",
"-name=test",
"-format=json",
}

ui := cli.NewMockUi()
cmd := New(ui)

code := cmd.Run(args)
out := ui.OutputWriter.String()

require.Equal(t, code, 0)
require.Empty(t, ui.ErrorWriter.String())
require.Contains(t, out, "test")

var jsonOutput json.RawMessage
err := json.Unmarshal([]byte(out), &jsonOutput)
assert.NoError(t, err)
})
}

func TestAuthMethodCreateCommand_k8s(t *testing.T) {
t.Parallel()

Expand Down
89 changes: 89 additions & 0 deletions command/acl/authmethod/update/authmethod_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/hashicorp/consul/testrpc"
"github.com/hashicorp/go-uuid"
"github.com/mitchellh/cli"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

// activate testing auth method
Expand Down Expand Up @@ -220,6 +221,94 @@ func TestAuthMethodUpdateCommand_JSON(t *testing.T) {
})
}

func TestAuthMethodUpdateCommand_JSON(t *testing.T) {
t.Parallel()

testDir := testutil.TempDir(t, "acl")
defer os.RemoveAll(testDir)

a := agent.NewTestAgent(t, t.Name(), `
primary_datacenter = "dc1"
acl {
enabled = true
tokens {
master = "root"
}
}`)

defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")

client := a.Client()

t.Run("update without name", func(t *testing.T) {
args := []string{
"-http-addr=" + a.HTTPAddr(),
"-token=root",
"-format=json",
}

ui := cli.NewMockUi()
cmd := New(ui)

code := cmd.Run(args)
require.Equal(t, code, 1)
require.Contains(t, ui.ErrorWriter.String(), "Cannot update an auth method without specifying the -name parameter")
})

createAuthMethod := func(t *testing.T) string {
id, err := uuid.GenerateUUID()
require.NoError(t, err)

methodName := "test-" + id

_, _, err = client.ACL().AuthMethodCreate(
&api.ACLAuthMethod{
Name: methodName,
Type: "testing",
Description: "test",
},
&api.WriteOptions{Token: "root"},
)
require.NoError(t, err)

return methodName
}

t.Run("update all fields", func(t *testing.T) {
name := createAuthMethod(t)

args := []string{
"-http-addr=" + a.HTTPAddr(),
"-token=root",
"-name=" + name,
"-description", "updated description",
"-format=json",
}

ui := cli.NewMockUi()
cmd := New(ui)

code := cmd.Run(args)
require.Equal(t, code, 0)
require.Empty(t, ui.ErrorWriter.String())

method, _, err := client.ACL().AuthMethodRead(
name,
&api.QueryOptions{Token: "root"},
)
require.NoError(t, err)
require.NotNil(t, method)
require.Equal(t, "updated description", method.Description)

output := ui.OutputWriter.String()

var jsonOutput json.RawMessage
err = json.Unmarshal([]byte(output), &jsonOutput)
assert.NoError(t, err)
})
}

func TestAuthMethodUpdateCommand_noMerge(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ github.com/linode/linodego v0.7.1/go.mod h1:ga11n3ivecUrPCHN0rANxKmfWBJVkOXfLMZi
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
Expand Down Expand Up @@ -339,7 +338,6 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 h1:hOY53G+kBFhbYFpRVxHl5eS7laP6B1+Cq+Z9Dry1iMU=
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.2.3 h1:f/MjBEBDLttYCGfRaKBbKSRVF5aV2O6fnBpzknuE3jU=
github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
Expand Down Expand Up @@ -382,7 +380,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
Expand Down Expand Up @@ -546,7 +543,6 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
4 changes: 4 additions & 0 deletions tlsutil/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,10 @@ func (c *Configurator) OutgoingALPNRPCWrapper() ALPNWrapper {
}
}

func (c *Configurator) UseTLS(dc string) bool {
return !c.outgoingRPCTLSDisabled() && c.getAreaForPeerDatacenterUseTLS(dc)
}

// AutoEncryptCertNotAfter returns NotAfter from the auto_encrypt cert. In case
// there is no cert, it will return a time in the past.
func (c *Configurator) AutoEncryptCertNotAfter() time.Time {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
//
// Version must conform to the format expected by github.com/hashicorp/go-version
// for tests to work.
Version = "1.7.0"
Version = "1.7.3"

// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
Expand Down
113 changes: 113 additions & 0 deletions website/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
set :base_url, "https://www.consul.io/"

activate :hashicorp do |h|
h.name = "consul"
h.version = "1.7.3"
h.github_slug = "hashicorp/consul"
end

# Netlify redirects/headers
proxy '_redirects', 'redirects.txt', ignore: true

helpers do
# Returns a segment tracking ID such that local development is not
# tracked to production systems.
def segmentId()
if (ENV['ENV'] == 'production')
'IyzLrqXkox5KJ8XL4fo8vTYNGfiKlTCm'
else
'0EXTgkNx0Ydje2PGXVbRhpKKoe5wtzcE'
end
end

# Returns the FQDN of the image URL.
#
# @param [String] path
#
# @return [String]
def image_url(path)
File.join(base_url, image_path(path))
end

# Get the title for the page.
#
# @param [Middleman::Page] page
#
# @return [String]
def title_for(page)
if page && page.data.page_title
return "#{page.data.page_title} - Consul by HashiCorp"
end

"Consul by HashiCorp"
end

# Get the description for the page
#
# @param [Middleman::Page] page
#
# @return [String]
def description_for(page)
description = (page.data.description || "Consul by HashiCorp")
.gsub('"', '')
.gsub(/\n+/, ' ')
.squeeze(' ')

return escape_html(description)
end

# This helps by setting the "active" class for sidebar nav elements
# if the YAML frontmatter matches the expected value.
def sidebar_current(expected)
current = current_page.data.sidebar_current || ""
if current.start_with?(expected)
return " class=\"active\""
else
return ""
end
end

# Returns the id for this page.
# @return [String]
def body_id_for(page)
if !(name = page.data.sidebar_current).blank?
return "page-#{name.strip}"
end
if page.url == "/" || page.url == "/index.html"
return "page-home"
end
if !(title = page.data.page_title).blank?
return title
.downcase
.gsub('"', '')
.gsub(/[^\w]+/, '-')
.gsub(/_+/, '-')
.squeeze('-')
.squeeze(' ')
end
return ""
end

# Returns the list of classes for this page.
# @return [String]
def body_classes_for(page)
classes = []

if !(layout = page.data.layout).blank?
classes << "layout-#{page.data.layout}"
end

if !(title = page.data.page_title).blank?
title = title
.downcase
.gsub('"', '')
.gsub(/[^\w]+/, '-')
.gsub(/_+/, '-')
.squeeze('-')
.squeeze(' ')
classes << "page-#{title}"
end

return classes.join(" ")
end
end
Loading