From 550eb2cd57208ab32a63bbe12641076929cbb5e9 Mon Sep 17 00:00:00 2001 From: Pantani Date: Fri, 19 Apr 2024 01:47:04 +0200 Subject: [PATCH] break the compute function and add unit tests --- .../tools/gen-mig-diffs/pkg/diff/testdata/modified/bar.txt | 1 + .../tools/gen-mig-diffs/pkg/diff/testdata/modified/foo.txt | 1 + .../tools/gen-mig-diffs/pkg/diff/testdata/modified/new.txt | 1 + .../tools/gen-mig-diffs/pkg/diff/testdata/modified/pkg/main.go | 3 +++ .../tools/gen-mig-diffs/pkg/diff/testdata/origin/bar.txt | 1 + .../tools/gen-mig-diffs/pkg/diff/testdata/origin/foo.txt | 1 + .../tools/gen-mig-diffs/pkg/diff/testdata/origin/pkg/main.go | 1 + 7 files changed, 9 insertions(+) create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/bar.txt create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/foo.txt create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/new.txt create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/pkg/main.go create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/bar.txt create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/foo.txt create mode 100644 ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/pkg/main.go diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/bar.txt b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/bar.txt new file mode 100644 index 0000000000..bd03c683ce --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/bar.txt @@ -0,0 +1 @@ +unmodified \ No newline at end of file diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/foo.txt b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/foo.txt new file mode 100644 index 0000000000..04fea06420 --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/foo.txt @@ -0,0 +1 @@ +world \ No newline at end of file diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/new.txt b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/new.txt new file mode 100644 index 0000000000..1271944b7e --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/new.txt @@ -0,0 +1 @@ +new file \ No newline at end of file diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/pkg/main.go b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/pkg/main.go new file mode 100644 index 0000000000..38dd16da61 --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/modified/pkg/main.go @@ -0,0 +1,3 @@ +package main + +func main() {} diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/bar.txt b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/bar.txt new file mode 100644 index 0000000000..bd03c683ce --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/bar.txt @@ -0,0 +1 @@ +unmodified \ No newline at end of file diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/foo.txt b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/foo.txt new file mode 100644 index 0000000000..b6fc4c620b --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/foo.txt @@ -0,0 +1 @@ +hello \ No newline at end of file diff --git a/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/pkg/main.go b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/pkg/main.go new file mode 100644 index 0000000000..06ab7d0f9a --- /dev/null +++ b/ignite/internal/tools/gen-mig-diffs/pkg/diff/testdata/origin/pkg/main.go @@ -0,0 +1 @@ +package main