Skip to content

Commit

Permalink
feat: TOOLS-2989 Schema and Config Tests for server 8.0 (#59)
Browse files Browse the repository at this point in the history
* feat: TOOLS-2989 Schema and Config Tests for server 8.0
  • Loading branch information
a-spiker authored Jan 9, 2025
1 parent 494543c commit 53af2d8
Show file tree
Hide file tree
Showing 8 changed files with 215 additions and 7 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ toolchain go1.23.1

require (
github.com/aerospike/aerospike-client-go/v7 v7.8.0
github.com/aerospike/aerospike-management-lib v1.5.1-0.20241028112258-5562cfa38ea5
github.com/aerospike/tools-common-go v0.0.0-20241008160846-fe05e01c0f83
github.com/aerospike/aerospike-management-lib v1.6.0
github.com/aerospike/tools-common-go v0.0.0-20250103065152-e9dbc6120714
github.com/bombsimon/logrusr/v4 v4.1.0
github.com/docker/docker v27.4.1+incompatible
github.com/go-logr/logr v1.4.2
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/aerospike/aerospike-client-go/v7 v7.8.0 h1:mKWTf/8sWQkWSYlIR3ZWXZMr9FQQPnIihrA+ujGD+n8=
github.com/aerospike/aerospike-client-go/v7 v7.8.0/go.mod h1:STlBtOkKT8nmp7iD+sEkr/JGEOu+4e2jGlNN0Jiu2a4=
github.com/aerospike/aerospike-management-lib v1.5.1-0.20241028112258-5562cfa38ea5 h1:hJsmyWNrXYLILGC520ZOOjVkbcCjkK3X3h829ZipZLk=
github.com/aerospike/aerospike-management-lib v1.5.1-0.20241028112258-5562cfa38ea5/go.mod h1:hsEptY/AmTmHoJnItJNmfJ4yCMG8LIB8YPnIpIyvGXI=
github.com/aerospike/tools-common-go v0.0.0-20241008160846-fe05e01c0f83 h1:q8iZiCYXGznOfPqA0dESEzwhyYcb/bv4Nsze02bxKXY=
github.com/aerospike/tools-common-go v0.0.0-20241008160846-fe05e01c0f83/go.mod h1:bRbp47f86+MvO4VIMOJa7MQVGEoObDlmmzBCbI5njcY=
github.com/aerospike/aerospike-management-lib v1.6.0 h1:+bV9bjO9APvF4EOH7+l6608B4rj2Ns8KJVQJ1qqCJsg=
github.com/aerospike/aerospike-management-lib v1.6.0/go.mod h1:hsEptY/AmTmHoJnItJNmfJ4yCMG8LIB8YPnIpIyvGXI=
github.com/aerospike/tools-common-go v0.0.0-20250103065152-e9dbc6120714 h1:KNMoO/NWboyWJhB7CGXUhESYPIQd2MtNDJdfQdrfQLo=
github.com/aerospike/tools-common-go v0.0.0-20250103065152-e9dbc6120714/go.mod h1:4DNS6ukaprOST0wb3n4hJ6/wDLyM6MQ0MCsmZC/CqKU=
github.com/bombsimon/logrusr/v4 v4.1.0 h1:uZNPbwusB0eUXlO8hIUwStE6Lr5bLN6IgYgG+75kuh4=
github.com/bombsimon/logrusr/v4 v4.1.0/go.mod h1:pjfHC5e59CvjTBIU3V3sGhFWFAnsnhOR03TRc6im0l8=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
Expand Down
2 changes: 1 addition & 1 deletion schema/schemas
Submodule schemas updated 1 files
+3,629 −0 json/aerospike/8.0.0.json
11 changes: 11 additions & 0 deletions testdata/cases/server80/conf-tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"Source":"testdata/cases/server80/server80.conf",
"Destination":"testdata/cases/server80/server80-res-.yaml",
"Expected":"testdata/cases/server80/server80.yaml",
"Arguments":["convert","--aerospike-version","8.0.0.0","--format","asconfig","--output","testdata/cases/server80/server80-res-.yaml"],
"SkipServerTest":false,
"ServerErrorAllowList":null,
"ServerImage":"aerospike/aerospike-server-enterprise:8.0.0.0-rc1"
}
]
107 changes: 107 additions & 0 deletions testdata/cases/server80/server80.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@

service {
cluster-name cl1

user root
group root
pidfile /dummy/file/path1

batch-max-requests 1000
tls-refresh-period 300S
}

logging {
console {
context any info
}
}

network {
service {
address any
port 3000
}

heartbeat {
mode multicast
multicast-group 127.0.0.1
port 9918




interval 150
timeout 10
}

fabric {
port 3001
}

info {
port 3003
}
}

namespace ns1 {
replication-factor 2

index-type shmem
sindex-type shmem

disable-mrt-writes false
mrt-duration 60
strong-consistency true
migrate-skip-unreadable false

default-read-touch-ttl-pct 50

storage-engine memory {
data-size 32G
}

evict-indexes-memory-pct 50

indexes-memory-budget 2147483648

nsup-period 2048

set s1 {
default-read-touch-ttl-pct -1
}

active-rack 2
}

namespace ns2 {
replication-factor 2
index-type shmem
sindex-type shmem
default-read-touch-ttl-pct 0
storage-engine device {
device /dummy/mount/point1
evict-used-pct 70
stop-writes-used-pct 70
stop-writes-avail-pct 20
flush-size 2M
}

set s2 {
default-read-touch-ttl-pct 50
}
}

security {
default-password-file /dummy/file/path2
}

xdr {
dc dataCenter1 {
node-address-port 127.0.0.1 3000
namespace ns1 {
remote-namespace ns2
ship-versions-interval 2M
ship-versions-policy interval
}
}
}
78 changes: 78 additions & 0 deletions testdata/cases/server80/server80.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
logging:
- any: info
name: console
namespaces:
- default-read-touch-ttl-pct: 0
index-type:
type: shmem
name: ns2
replication-factor: 2
sets:
- default-read-touch-ttl-pct: 50
name: s2
sindex-type:
type: shmem
storage-engine:
devices:
- /dummy/mount/point1
evict-used-pct: 70
flush-size: 2097152
stop-writes-avail-pct: 20
stop-writes-used-pct: 70
type: device
- active-rack: 2
default-read-touch-ttl-pct: 50
evict-indexes-memory-pct: 50
index-type:
type: shmem
indexes-memory-budget: 2147483648
name: ns1
nsup-period: 2048
replication-factor: 2
disable-mrt-writes: false
mrt-duration: 60
strong-consistency: true
migrate-skip-unreadable: false
sets:
- default-read-touch-ttl-pct: -1
name: s1
sindex-type:
type: shmem
storage-engine:
data-size: 34359738368
type: memory
network:
fabric:
port: 3001
heartbeat:
interval: 150
mode: multicast
multicast-groups:
- 127.0.0.1
port: 9918
timeout: 10
info:
port: 3003
service:
addresses:
- any
port: 3000
security:
default-password-file: /dummy/file/path2
service:
batch-max-requests: 1000
cluster-name: cl1
group: root
pidfile: /dummy/file/path1
tls-refresh-period: 300
user: root
xdr:
dcs:
- name: dataCenter1
namespaces:
- name: ns1
remote-namespace: ns2
ship-versions-interval: 120
ship-versions-policy: interval
node-address-ports:
- 127.0.0.1:3000
1 change: 1 addition & 0 deletions testdata/cases/server80/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"TestedVersion":"8.0.0.0-rc1","OriginallyUsedVersion":"8.0.0.0-rc1"}
11 changes: 11 additions & 0 deletions testdata/cases/server80/yaml-tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"Source":"testdata/cases/server80/server80.yaml",
"Destination":"testdata/cases/server80/server80-res-.conf",
"Expected":"testdata/cases/server80/server80.conf",
"Arguments":["convert","--aerospike-version","8.0.0.0","--format","yaml","--output","testdata/cases/server80/server80-res-.conf"],
"SkipServerTest":false,
"ServerErrorAllowList":null,
"ServerImage":"aerospike/aerospike-server-enterprise:8.0.0.0-rc1"
}
]

0 comments on commit 53af2d8

Please sign in to comment.