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

Report FQDN #144

Merged
merged 67 commits into from
Feb 15, 2023
Merged
Changes from 4 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
fac6132
linux and windows done
AndersonQ Jan 4, 2023
0c3f9c2
send
AndersonQ Jan 4, 2023
6843a8f
using gethostname and getdomainname instead of hostname -f
AndersonQ Jan 5, 2023
38abc2e
don't use deprecated functions
AndersonQ Jan 5, 2023
a79bc82
.
AndersonQ Jan 5, 2023
c1b9c48
nocgo fallback and fix darwin types
AndersonQ Jan 5, 2023
9232921
add doc
AndersonQ Jan 17, 2023
78a3239
wip
AndersonQ Jan 17, 2023
7128e81
remove unnecessary C import
AndersonQ Jan 17, 2023
e387f3c
wip
AndersonQ Jan 23, 2023
79a48f4
.
AndersonQ Jan 23, 2023
21d5286
.
AndersonQ Jan 23, 2023
8b03c7a
.
AndersonQ Jan 23, 2023
65bd274
add license header
AndersonQ Jan 23, 2023
2b02410
add integration build tag and run them on ci
AndersonQ Jan 23, 2023
0587e49
adjust tests
AndersonQ Jan 23, 2023
c5a4262
more info on test errors
AndersonQ Jan 24, 2023
99d7550
force ci build
AndersonQ Jan 24, 2023
b09b009
force ci build - undo changes
AndersonQ Jan 24, 2023
791efa3
force ci build
AndersonQ Jan 26, 2023
47ca564
force ci build - undo changes
AndersonQ Jan 26, 2023
6ea8012
fetch FQDN instead of building it on windows
AndersonQ Jan 26, 2023
8102002
use local instead of lan for darwin
AndersonQ Jan 26, 2023
1d7b6b3
avoid shadowing
AndersonQ Jan 26, 2023
d28c9df
fix darwin no Cgo
AndersonQ Jan 26, 2023
edf1a6f
remove integration tests
AndersonQ Jan 27, 2023
00761d9
enable integration tests
AndersonQ Jan 27, 2023
10bca72
testing things
AndersonQ Jan 27, 2023
fc0392f
Merge branch 'main' into report-fqdn
v1v Jan 27, 2023
a58e096
change permissions
v1v Jan 27, 2023
f9900cb
run all tests and add TODO
AndersonQ Jan 27, 2023
3f79759
WIP
AndersonQ Jan 30, 2023
30eb9e6
parse fqdn from hosts file
AndersonQ Jan 31, 2023
7b81bb8
get fqdn from /etc/hosts for linux and darwin
AndersonQ Jan 31, 2023
5446c0c
add fallback using net.Lookup
AndersonQ Jan 31, 2023
d5226bc
.
AndersonQ Jan 31, 2023
24cb68f
more logs
AndersonQ Jan 31, 2023
2a2e222
try to fix formating
AndersonQ Jan 31, 2023
9f41195
update go versions 1.18 and tests to 1.18 and 1.19
AndersonQ Feb 1, 2023
17c0e2d
restore check_format and remove debug log
AndersonQ Feb 1, 2023
b062876
add build tag to test file
AndersonQ Feb 1, 2023
eca2e34
.
AndersonQ Feb 1, 2023
1061a2c
goimports
AndersonQ Feb 1, 2023
5209338
allow FQDN errors on test
AndersonQ Feb 1, 2023
bd62e40
restore jenkins info level
AndersonQ Feb 1, 2023
4461fbc
trigger build
AndersonQ Feb 1, 2023
e3567d3
undo - trigger build
AndersonQ Feb 1, 2023
db6bdac
improve error message
AndersonQ Feb 1, 2023
02f9780
not fail on Hosts tests
AndersonQ Feb 1, 2023
0df9a28
.
AndersonQ Feb 1, 2023
2d1b47a
.
AndersonQ Feb 1, 2023
6fc8457
.
AndersonQ Feb 1, 2023
69f45ef
.
AndersonQ Feb 1, 2023
64a11df
quote tabs on tests
AndersonQ Feb 1, 2023
d664ddb
remove debug
AndersonQ Feb 1, 2023
4da8ad9
removing dot suffix
AndersonQ Feb 1, 2023
c8b0e3d
.
AndersonQ Feb 1, 2023
85120c0
remove comments
AndersonQ Feb 2, 2023
c31ec2d
Update providers/shared/fqdn.go
jlind23 Feb 7, 2023
8b7b674
Update providers/linux/host_fqdn_integration_docker_linux_test.go
jlind23 Feb 7, 2023
687a468
Update providers/linux/host_fqdn_integration_docker_linux_test.go
jlind23 Feb 7, 2023
01676da
review changes
AndersonQ Feb 14, 2023
a34bbd3
Merge remote-tracking branch 'origin/report-fqdn' into report-fqdn
AndersonQ Feb 14, 2023
88dc9f8
add missing import
AndersonQ Feb 14, 2023
f8d318e
don't parse /etc/hosts to get FQDN on linux and darwin
AndersonQ Feb 15, 2023
9c01d40
remove tests for removed things
AndersonQ Feb 15, 2023
d88406a
add changelog
AndersonQ Feb 15, 2023
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
4 changes: 2 additions & 2 deletions providers/linux/host_fqdn_integration_docker_linux_test.go
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import (
func TestHost_FQDN_set(t *testing.T) {
host, err := newLinuxSystem("").Host()
if err != nil {
t.Fatal(fmt.Errorf("could not het host information: %w", err))
t.Fatal(fmt.Errorf("could not get host information: %w", err))
}

got := host.Info()
@@ -39,7 +39,7 @@ func TestHost_FQDN_set(t *testing.T) {
func TestHost_FQDN_not_set(t *testing.T) {
host, err := newLinuxSystem("").Host()
if err != nil {
t.Fatal(fmt.Errorf("could not het host information: %w", err))
t.Fatal(fmt.Errorf("could not get host information: %w", err))
}

got := host.Info()
2 changes: 1 addition & 1 deletion providers/shared/fqdn.go
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ const etcHosts = "/etc/hosts"
func FQDN() (string, error) {
hostname, err := os.Hostname()
if err != nil {
return "", fmt.Errorf("could get hostname to look for FQDN: %w", err)
return "", fmt.Errorf("could not get hostname to look for FQDN: %w", err)
}

var errs error