(t *testing.T)
| 1998 | } |
| 1999 | |
| 2000 | func TestUpsertEmptyUID(t *testing.T) { |
| 2001 | SetupBankExample(t) |
| 2002 | m1 := ` |
| 2003 | upsert { |
| 2004 | query { |
| 2005 | var(func: has(amount)) { |
| 2006 | amt as amount |
| 2007 | } |
| 2008 | me() { |
| 2009 | max_amt as max(val(amt)) |
| 2010 | } |
| 2011 | v as q(func: eq(name, "Michael")) { |
| 2012 | amount |
| 2013 | } |
| 2014 | } |
| 2015 | |
| 2016 | mutation { |
| 2017 | set { |
| 2018 | uid(v) <amount> val(max_amt) . |
| 2019 | } |
| 2020 | } |
| 2021 | }` |
| 2022 | mr, err := mutationWithTs(mutationInp{body: m1, typ: "application/rdf", commitNow: true}) |
| 2023 | require.NoError(t, err) |
| 2024 | result := QueryResult{} |
| 2025 | require.NoError(t, json.Unmarshal(mr.data, &result)) |
| 2026 | require.Equal(t, 0, len(result.Queries["q"])) |
| 2027 | } |
| 2028 | |
| 2029 | func TestUpsertBulkUpdateBranch(t *testing.T) { |
| 2030 | require.NoError(t, dropAll()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…