• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cinode / go / 6921944157

19 Nov 2023 05:26PM UTC coverage: 95.042% (+4.1%) from 90.909%
6921944157

Pull #41

github

byo
Better static_datastore cmd test
Pull Request #41: Internal refactor

1236 of 1316 new or added lines in 37 files covered. (93.92%)

4 existing lines in 3 files now uncovered.

2971 of 3126 relevant lines covered (95.04%)

1.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/pkg/cinodefs/node_file.go
1
/*
2
Copyright © 2023 Bartłomiej Święcki (byo)
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
package cinodefs
18

19
import (
20
        "context"
21
)
22

23
// Entry is a file with its entrypoint
24
type nodeFile struct {
25
        ep *Entrypoint
26
}
27

NEW
28
func (c *nodeFile) dirty() dirtyState {
×
NEW
29
        return dsClean
×
NEW
30
}
×
31

NEW
32
func (c *nodeFile) flush(ctx context.Context, gc *graphContext) (node, *Entrypoint, error) {
×
NEW
33
        return c, c.ep, nil
×
NEW
34
}
×
35

36
func (c *nodeFile) traverse(
37
        ctx context.Context,
38
        gc *graphContext,
39
        path []string,
40
        pathPosition int,
41
        linkDepth int,
42
        isWritable bool,
43
        opts traverseOptions,
44
        whenReached traverseGoalFunc,
45
) (
46
        node,
47
        dirtyState,
48
        error,
49
) {
1✔
50
        if pathPosition == len(path) {
2✔
51
                return whenReached(ctx, c, isWritable)
1✔
52
        }
1✔
53

54
        // We're supposed to traverse into sub-path but it's not a directory
55
        return nil, 0, ErrNotADirectory
1✔
56
}
57

58
func (c *nodeFile) entrypoint() (*Entrypoint, error) {
1✔
59
        return c.ep, nil
1✔
60
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc